chiark / gitweb /
test suite: t-setup-done: Arrange to save all DGIT_TEST_REAL_*
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 30 Jun 2019 19:31:20 +0000 (20:31 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 30 Jun 2019 20:08:08 +0000 (21:08 +0100)
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>
tests/lib

index 00ef4170be323bf5a3318fa5278203c063ec3ca7..28b08e617f51787711b9d19dcb92300a86328884 100644 (file)
--- 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"