From f4f72bcf21127a1f75baa988b765317e80a7486e Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 17 Jul 2020 02:19:21 +0100 Subject: test(3p/nix): Set up scaffolding & fix up tests for value-to-{json|xml} 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 Change-Id: I79d61854a3ff47301cdce8a40c76820a97bdf901 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1240 Tested-by: BuildkiteCI Reviewed-by: glittershark --- third_party/nix/src/libstore/store-api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'third_party/nix/src/libstore') diff --git a/third_party/nix/src/libstore/store-api.cc b/third_party/nix/src/libstore/store-api.cc index f28b13c83d..dd1b199d92 100644 --- a/third_party/nix/src/libstore/store-api.cc +++ b/third_party/nix/src/libstore/store-api.cc @@ -446,7 +446,7 @@ PathSet Store::queryValidPaths(const PathSet& paths, responsibility of the caller to provide a closure. */ std::string Store::makeValidityRegistration(const PathSet& paths, bool showDerivers, bool showHash) { - std::string s = s; + std::string s; for (auto& i : paths) { s += i + "\n"; -- cgit 1.4.1