testing: fix f2 NIX_BIN_DIR determination from meson
`nix.full_path()` is the *built* path, not the *installed* path. in the sandbox this point to a location that contains *only* `nix`, not any of the old-cli symlinks. any test that needs them in path would thus fail. Change-Id: Ia651db8d1151a84f8d1b52e8993f6db61b0fe104
This commit is contained in:
+3
-1
@@ -606,8 +606,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
mkdir -p $out/nix-support
|
||||
echo "doc internal-api-docs $out/share/doc/nix/internal-api/html" >> "$out/nix-support/hydra-build-products"
|
||||
''
|
||||
+ ''
|
||||
+ lib.optionalString (sanitize == null) ''
|
||||
# Drop all references to libstd++ include files due to `__FILE__` leaking in libstd++ assertions.
|
||||
# we do NOT want to do this during asan builds because it breaks the test suite! but as we do not
|
||||
# actually want to ship asan builds in any reasonable capacity the leak will not matter that much
|
||||
find "$out" -type f -exec remove-references-to -t ${stdenv.cc.cc.stdenv.cc.cc} '{}' +
|
||||
'';
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ xdist_opts = [
|
||||
functional2_env = environment()
|
||||
# set the bin dir for us to know where to find the lix binaries for our declarative path
|
||||
# without leaking all of PATH or env
|
||||
functional2_env.set('NIX_BIN_DIR', fs.parent(nix.full_path()))
|
||||
functional2_env.set('NIX_BIN_DIR', bindir)
|
||||
if build_test_shell != ''
|
||||
functional2_env.set('BUILD_TEST_SHELL', build_test_shell)
|
||||
endif
|
||||
|
||||
@@ -40,6 +40,5 @@ class TestLocalStore:
|
||||
assert info["trusted"]
|
||||
|
||||
def test_doctor_shows_trust(self, nix: Nix):
|
||||
# doctor wants nix-env on path, and the profile lookup test will *always* fail
|
||||
result = nix.nix(["--store", "./x", "doctor"]).run().expect(2)
|
||||
result = nix.nix(["--store", "./x", "doctor"]).run().ok()
|
||||
assert "You are trusted by" in result.stderr_plain
|
||||
|
||||
Reference in New Issue
Block a user