forked from lix-project/lix
Fix test failures when $TMPDIR changes
This commit is contained in:
parent
b9c016abc1
commit
c38c726eb5
|
@ -8,13 +8,13 @@ clearStore
|
||||||
clearCache
|
clearCache
|
||||||
|
|
||||||
# Ensure this builds successfully first
|
# Ensure this builds successfully first
|
||||||
nix build -f dependencies.nix
|
nix build --no-link -f dependencies.nix
|
||||||
|
|
||||||
clearStore
|
clearStore
|
||||||
clearCache
|
clearCache
|
||||||
|
|
||||||
# Try --dry-run using old command first
|
# Try --dry-run using old command first
|
||||||
nix-build dependencies.nix --dry-run 2>&1 | grep "will be built"
|
nix-build --no-out-link dependencies.nix --dry-run 2>&1 | grep "will be built"
|
||||||
# Now new command:
|
# Now new command:
|
||||||
nix build -f dependencies.nix --dry-run 2>&1 | grep "will be built"
|
nix build -f dependencies.nix --dry-run 2>&1 | grep "will be built"
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ clearCache
|
||||||
# Try --dry-run using new command first
|
# Try --dry-run using new command first
|
||||||
nix build -f dependencies.nix --dry-run 2>&1 | grep "will be built"
|
nix build -f dependencies.nix --dry-run 2>&1 | grep "will be built"
|
||||||
# Now old command:
|
# Now old command:
|
||||||
nix-build dependencies.nix --dry-run 2>&1 | grep "will be built"
|
nix-build --no-out-link dependencies.nix --dry-run 2>&1 | grep "will be built"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###################################################
|
###################################################
|
||||||
|
|
|
@ -7,7 +7,7 @@ remoteRoot=$TEST_ROOT/store2
|
||||||
chmod -R u+w "$remoteRoot" || true
|
chmod -R u+w "$remoteRoot" || true
|
||||||
rm -rf "$remoteRoot"
|
rm -rf "$remoteRoot"
|
||||||
|
|
||||||
outPath=$(nix-build dependencies.nix)
|
outPath=$(nix-build --no-out-link dependencies.nix)
|
||||||
|
|
||||||
nix copy --to "ssh://localhost?store=$NIX_STORE_DIR&remote-store=$remoteRoot%3fstore=$NIX_STORE_DIR%26real=$remoteRoot$NIX_STORE_DIR" $outPath
|
nix copy --to "ssh://localhost?store=$NIX_STORE_DIR&remote-store=$remoteRoot%3fstore=$NIX_STORE_DIR%26real=$remoteRoot$NIX_STORE_DIR" $outPath
|
||||||
|
|
||||||
|
|
|
@ -27,13 +27,13 @@ output=$(nix-shell --pure --keep SELECTED_IMPURE_VAR shell.nix -A shellDrv --run
|
||||||
# Test nix-shell on a .drv symlink
|
# Test nix-shell on a .drv symlink
|
||||||
|
|
||||||
# Legacy: absolute path and .drv extension required
|
# Legacy: absolute path and .drv extension required
|
||||||
nix-instantiate shell.nix -A shellDrv --indirect --add-root shell.drv
|
nix-instantiate shell.nix -A shellDrv --indirect --add-root $TEST_ROOT/shell.drv
|
||||||
[[ $(nix-shell --pure $PWD/shell.drv --run \
|
[[ $(nix-shell --pure $TEST_ROOT/shell.drv --run \
|
||||||
'echo "$IMPURE_VAR - $VAR_FROM_STDENV_SETUP - $VAR_FROM_NIX"') = " - foo - bar" ]]
|
'echo "$IMPURE_VAR - $VAR_FROM_STDENV_SETUP - $VAR_FROM_NIX"') = " - foo - bar" ]]
|
||||||
|
|
||||||
# New behaviour: just needs to resolve to a derivation in the store
|
# New behaviour: just needs to resolve to a derivation in the store
|
||||||
nix-instantiate shell.nix -A shellDrv --indirect --add-root shell
|
nix-instantiate shell.nix -A shellDrv --indirect --add-root $TEST_ROOT/shell
|
||||||
[[ $(nix-shell --pure shell --run \
|
[[ $(nix-shell --pure $TEST_ROOT/shell --run \
|
||||||
'echo "$IMPURE_VAR - $VAR_FROM_STDENV_SETUP - $VAR_FROM_NIX"') = " - foo - bar" ]]
|
'echo "$IMPURE_VAR - $VAR_FROM_STDENV_SETUP - $VAR_FROM_NIX"') = " - foo - bar" ]]
|
||||||
|
|
||||||
# Test nix-shell -p
|
# Test nix-shell -p
|
||||||
|
|
|
@ -18,5 +18,3 @@ nix-build --no-out-link -E '
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
'
|
'
|
||||||
|
|
||||||
echo XYZZY
|
|
||||||
|
|
Loading…
Reference in a new issue