Explorar el Código

t: Filter out any environment variable starting with DEB_ in mk.t

These might affect the test results, and make them fail.
Guillem Jover hace 10 años
padre
commit
b83c018366
Se han modificado 2 ficheros con 3 adiciones y 1 borrados
  1. 2 0
      debian/changelog
  2. 1 1
      scripts/t/mk.t

+ 2 - 0
debian/changelog

@@ -31,6 +31,8 @@ dpkg (1.18.3) UNRELEASED; urgency=low
     - Get the reference build flags from dpkg-buildflags.pl, instead of
       hardcoding them, which might not match depending on the architecture.
       Closes: #794694
+    - Delete any environment variable starting with DEB_ in mk.t that might
+      affect the test results.
   * Build system:
     - Add a new --with-devlibdir configure option for the C libdpkg library.
   * Packaging:

+ 1 - 1
scripts/t/mk.t

@@ -31,7 +31,7 @@ my $datadir = "$srcdir/t/mk";
 $ENV{$_} = rel2abs($ENV{$_}) foreach qw(srcdir DPKG_DATADIR DPKG_ORIGINS_DIR);
 
 # Delete variables that can affect the tests.
-delete $ENV{DEB_VENDOR};
+delete $ENV{$_} foreach grep { m/^DEB_/ } keys %ENV;
 
 sub test_makefile {
     my $makefile = shift;