Explorar el Código

test: Delete MAKEFLAGS when testing make invocations

If the parent has been called with -jN then the MAKEFLAGS will contain
information to be used by the jobserver, but those file descriptors are
closed in the way, and make complains.

As we are testing the makefiles serially anyway, just remove the
MAKEFLAGS to get rid of the warnings.
Guillem Jover hace 9 años
padre
commit
f59f70bdad
Se han modificado 2 ficheros con 6 adiciones y 1 borrados
  1. 1 0
      debian/changelog
  2. 5 1
      scripts/t/mk.t

+ 1 - 0
debian/changelog

@@ -151,6 +151,7 @@ dpkg (1.18.11) UNRELEASED; urgency=medium
     - Add an initial functional test suite for dpkg-deb and dpkg-split.
     - Skip the involved tests if IO::String is missing.
     - Add new unit test for libdpkg error handling.
+    - Delete MAKEFLAGS environment variable when testing make invocations.
   * Build system:
     - Add support for profiling perl modules.
     - Clean up compiler and linker automatic flag usage in configure.

+ 5 - 1
scripts/t/mk.t

@@ -31,7 +31,11 @@ my $datadir = "$srcdir/t/mk";
 # directory with «make -C».
 $ENV{$_} = rel2abs($ENV{$_}) foreach qw(srcdir DPKG_DATADIR DPKG_ORIGINS_DIR);
 
-# Delete variables that can affect the tests.
+# Any paralellization from the parent should be ignored, we are testing
+# the makefiles serially anyway.
+delete $ENV{MAKEFLAGS};
+
+# Delete other variables that can affect the tests.
 delete $ENV{$_} foreach grep { m/^DEB_/ } keys %ENV;
 
 $ENV{DEB_BUILD_PATH} = rel2abs($datadir);