about summary refs log tree commit diff
path: root/third_party/nix/src/tests/value-to-json.cc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-08-03 r/1557 refactor(3p/nix): Only initialise garbage-collector where neededVincent Ambo1-1/+1
Only libexpr depends on the garbage collector, specifically only instantiations of EvalState actually require the GC to be initialised. Rather than always starting it for the whole program, even if it is not needed, this change moves the GC initialisation into libexpr, guarded by absl::call_once. This should make it possible to run the nix daemon without the garbage collector interfering, granted that things are correcty separated and the daemon does not actually invoke the evaluator. Based on my investigation so far, the daemon logic itself does not require libexpr to be present at all - so I think it is safe - but the current monobinary might have some tricks up its sleeve that will cause problems for us. We can deal with those if they arise. Relates to https://b.tvl.fyi/issues/30 Change-Id: I61c745f96420c02e089bd3c362ac3ccb117d3073 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1584 Tested-by: BuildkiteCI Reviewed-by: edef <edef@edef.eu> Reviewed-by: kanepyork <rikingcoding@gmail.com>
2020-08-01 r/1534 fix(3p/nix): revert "apply all clang-tidy fixes"Kane York1-20/+20
This reverts commit ef54f5da9fa30b5c302f2a49595ee5d041f9706a. Resolved conflicts: third_party/nix/src/libexpr/eval.cc third_party/nix/src/libstore/builtins/fetchurl.cc third_party/nix/src/libstore/references.cc third_party/nix/src/libutil/hash.cc third_party/nix/src/nix-daemon/nix-daemon.cc Change-Id: Ib9cf6e96a79a23bde3983579ced3f92e530cb011 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1547 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
2020-07-27 r/1495 fix(3p/nix): apply all clang-tidy fixesKane York1-20/+20
Change-Id: I265e763393422ee1881653527c91024458060825 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1432 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2020-07-19 r/1399 chore(3p/nix): Enable clang-format check in derivation buildVincent Ambo1-1/+0
This is the easiest way to get the checks up and running for now, but we will probably want to separate out things like this into a separate build step in the future. Change-Id: I8e1a1095aef09b1eee97abad5b6240bc64d14b8c Reviewed-on: https://cl.tvl.fyi/c/depot/+/1287 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-19 r/1389 fix(3p/nix/tests): Fail DummyStore::addToStore on non-existent srcPathVincent Ambo1-2/+2
Unfortunately, to guarantee correct behaviour of some evaluation (!) tests, addToStore needs to actually check whether passed in source files exist and fail appropriately. There is a chance that the dependency on this behaviour is actually a bug in the upstream test suite, but my attempts at finding out more about this from, say, the git history have so far been unsuccessful. Change-Id: I311999ea28fcedf5da13a4e627b1c1c8e4e59cbd Reviewed-on: https://cl.tvl.fyi/c/depot/+/1276 Reviewed-by: isomer <isomer@tvl.fyi> Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
2020-07-18 r/1378 refactor(3p/nix/tests): Move DummyStore into a separate fileVincent Ambo1-33/+3
This store implementation is required in all unit tests that use the evaluator. Change-Id: I1cfe8cecab8722cd66dc803747821a2be2b2619f Reviewed-on: https://cl.tvl.fyi/c/depot/+/1269 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-18 r/1369 test(3p/nix): Set up scaffolding & fix up tests for value-to-{json|xml}Vincent Ambo1-45/+46
Configures the CMake build to load & run the GoogleTest tests. I (grfn) also updated this to get the tests running as part of the nix derivation, which required defining our own manual configurePhase and installCheckPhase, rather than depending on the one provided by stdenv. Not doing this would cause cmake to attempt to *run* the tests as part of the buildPhase, which wouldn't work because the dynamic libraries hadn't been put into a place where the test executables knew where to find them. We're not sure *why* this fixes it, and for some reason fixing this also breaks the automatic behavior of nixpkgs of passing -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES to make, but that's eaasy enough to fix manually in a preBuild Paired-With: Griffin Smith <grfn@gws.fyi> Change-Id: I79d61854a3ff47301cdce8a40c76820a97bdf901 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1240 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-18 r/1368 test(3p/nix/libexpr): add json/xml testsAndreas Rammhold1-0/+287
Backported from: https://github.com/andir/nix/commit/c1371b6fbb91caf53ebc94d3ae0250dbe7eb7eae Change-Id: Ida326cf1567081a56d747c4a72f036f55cfdea37 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1239 Tested-by: BuildkiteCI Reviewed-by: Kane York <rikingcoding@gmail.com>