about summary refs log tree commit diff
path: root/third_party/nix/src/tests/derivations_test.cc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-05-19 r/4098 chore(3p/nix): unvendor tvix 0.1Vincent Ambo1-109/+0
Nothing is using this now, and we'll likely never pick this up again, but we learned a lot in the process. Every now and then this breaks in some bizarre way on channel bumps and it's just a waste of time to maintain that. Change-Id: Idcf2f5acd4ca7070ce18d7149cbfc0d967dc0a44 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5632 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi> Autosubmit: tazjin <tazjin@tvl.su>
2020-11-28 r/1948 refactor(tvix): Centralize arbitrary definitionsGriffin Smith1-67/+1
To make it easier for future tests to use the arbitrary specialisations we've defined for some nix types, centralize them all in a single arbitrary.hh header file. Change-Id: I767f27949cfe7ec55c79901f7d7aa538d2f98c6b Reviewed-on: https://cl.tvl.fyi/c/depot/+/2182 Tested-by: BuildkiteCI Reviewed-by: kanepyork <rikingcoding@gmail.com>
2020-11-19 r/1886 fix(tvix): Use copy constructor to add strings to protosGriffin Smith1-0/+28
Passing a string directly to add_paths like this causes the proto class to take ownership over the string, meaning when it is destructed it will *explicitly* free the string. When the string's actual owner (the derivation struct) then goes out of scope it'll get freed again, causing a double-free. This fixes that to instead use the copy constructor to assign to a pointer to a new path, and covers the whole to_proto method with a rapidcheck test. Fixes: b/64 Change-Id: I84235bed9104ff430a0acf686d4a96f1e2e9a897 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2106 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2020-08-06 r/1610 refactor(tvix): Use absl::btree_map for DerivationOutputsVincent Ambo1-0/+11
This container implementation is much faster than std::map. We have stuck to an ordered container because it's unclear whether the accesses of this field (of which there are *many*) are actually ordering dependent. Also includes an Arbitrary implementation for absl::btree_map (for any K, V that are also Arbitrary). Change-Id: I04f58ca0ce32b9ae1759313b01508b0e44bae793 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1683 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
2020-08-03 r/1571 fix(3p/nix): Fix parseDrvPathWithOutputsGriffin Smith1-0/+30
At some point the behavior of this function got changed as part of our cleanup - this fixes it to behave the way the rest of the codebase expects (and how it is documented in the header) and covers it with a few tests. Change-Id: Id4c91232968e73489cd866fb4a2a84bcf20d875e Reviewed-on: https://cl.tvl.fyi/c/depot/+/1629 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2020-08-02 r/1548 test(3p/nix): Add test for derivation parse/serializeGriffin Smith1-0/+106
Add a rapidcheck test covering roundtrip parse and serialize for Nix derivations. This covers a bug we discovered in ef54f5d which broke this roundtrip. Change-Id: I72d140334b5f24f79e82e34f98609c695dbfbf93 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1582 Tested-by: BuildkiteCI Reviewed-by: kanepyork <rikingcoding@gmail.com>