summaryrefslogtreecommitdiff
path: root/tests/lib
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2019-06-30 20:31:20 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2019-06-30 21:08:08 +0100
commite54cf303cef16086dab785aa18e897332b29b0a2 (patch)
treee7ab271d1b2843812f1b6671c483ae565456a668 /tests/lib
parent53fb22478f70f7007e9c19cccc8d819c50422c57 (diff)
test suite: t-setup-done: Arrange to save all DGIT_TEST_REAL_*
Otherwise the importer may end up with our stunt versions on their PATH, but without the necessary DGIT_TEST_REAL_* variables which stop infinite recursion. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/lib b/tests/lib
index 00ef417..28b08e6 100644
--- a/tests/lib
+++ b/tests/lib
@@ -520,6 +520,14 @@ t-setup-done () {
' $vn "$(eval "printf '%s\n' \"\$$vn\"")"
done
+ perl >&4 -"I$root" -MDebian::Dgit -we '
+ foreach my $vn (grep m/^DGIT_TEST_REAL_/, keys %ENV) {
+ print STDERR "saving-exporting $vn\n";
+ printf "export %s=%s\n", $vn, shellquote $ENV{$vn}
+ or die $!;
+ }
+ '
+
(set -e; cd $tmp; tar cf $import.tar $savedirs)
printf >&4 "\n%s\n" "$importeval"