chiark / gitweb /
test suite: Arrange not to overwrite .save-env on t-chain-test
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 10 Jan 2017 17:00:42 +0000 (17:00 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 10 Jan 2017 17:03:03 +0000 (17:03 +0000)
We want .save-env to be the env on entry to the original test, not
on execution of t-chain-test with a modified environment.

Without this the effects of t-defdistro might leak into the execution
of tests/setup/examplegit.  This is no good because
tests/setup/examplegit relies in the -dtest-dummy which is our usual
dgit runes.  (Or to put it another way, examplegit uses many suites
which are not (yet) set up properly by t-defdistro.)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/lib

index 4ddd6d8ac7451d34a5728b759bac0c5a52ef0f64..7023dbfab7ce5e45a9a2175a4de7d4e0c567612b 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -53,6 +53,7 @@ tmp=`pwd`
 
 t-set-using-tmp
 
 
 t-set-using-tmp
 
+test -f $tmp/.save-env || \
 env -0 >$tmp/.save-env
 
 ln -f $troot/ssh ssh
 env -0 >$tmp/.save-env
 
 ln -f $troot/ssh ssh