mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
nixos/lib/testing: Fix unsetting $xchg
Regression introduced by4dcb685af9. Unsetting the environment variable shortly before using it is not going to end up very well, so let's just filter out the variable from the output of export and unset it shortly afterwards. This fixes the runInMachine NixOS test. Signed-off-by: aszlig <aszlig@redmoonstudios.org> (cherry picked from commitb4e2b6bc6a)
This commit is contained in:
@@ -181,9 +181,11 @@ rec {
|
||||
eval $i2=/tmp/xchg/$_basename
|
||||
${coreutils}/bin/ls -la $xchg
|
||||
done
|
||||
unset i i2 _basename xchg
|
||||
|
||||
export > $xchg/saved-env
|
||||
unset i i2 _basename
|
||||
export | ${gnugrep}/bin/grep -v '^xchg=' > $xchg/saved-env
|
||||
unset xchg
|
||||
|
||||
export tests='${testScript}'
|
||||
${testDriver}/bin/nixos-test-driver ${vm.config.system.build.vm}/bin/run-*-vm
|
||||
''; # */
|
||||
|
||||
Reference in New Issue
Block a user