nixos/lib/testing: Fix unsetting $xchg

Regression introduced by 4dcb685af9.

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>
This commit is contained in:
aszlig 2016-09-11 17:27:07 +02:00
parent 38ae858e28
commit b4e2b6bc6a
No known key found for this signature in database
GPG Key ID: 1DE8E48E57DB5436

View File

@ -181,9 +181,11 @@ rec {
eval $i2=/tmp/xchg/$_basename eval $i2=/tmp/xchg/$_basename
${coreutils}/bin/ls -la $xchg ${coreutils}/bin/ls -la $xchg
done 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}' export tests='${testScript}'
${testDriver}/bin/nixos-test-driver ${vm.config.system.build.vm}/bin/run-*-vm ${testDriver}/bin/nixos-test-driver ${vm.config.system.build.vm}/bin/run-*-vm
''; # */ ''; # */