summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-09-29 16:33:04 -0400
committerJoey Hess <joey@kitenet.net>2010-09-29 16:33:04 -0400
commit7301d3ae09789a12fc2d5a4699f084229cee873c (patch)
tree95ecc9824bc1acc0e297fc59968cf241dba64457 /t
parente69683dc13ff9610d982069a9a2e8a311b500655 (diff)
stop testing jobserver availability code
Testing this is sensative to what FDs are inherited by the test script. After the recent fix, it started breaking another way.
Diffstat (limited to 't')
-rwxr-xr-xt/buildsystems/buildsystem_tests23
1 files changed, 3 insertions, 20 deletions
diff --git a/t/buildsystems/buildsystem_tests b/t/buildsystems/buildsystem_tests
index 398fd96..f265723 100755
--- a/t/buildsystems/buildsystem_tests
+++ b/t/buildsystems/buildsystem_tests
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-use Test::More tests => 300;
+use Test::More tests => 292;
use strict;
use warnings;
@@ -499,54 +499,37 @@ ok ( ! -e 'bld', "bld got deleted too" );
#### Test parallel building and related options / routines
@tmp = ( $ENV{MAKEFLAGS}, $ENV{DEB_BUILD_OPTIONS} );
-use POSIX;
-sub closefd {
- POSIX::close(shift);
-}
-
-# Test is_make_jobserver_unavailable and clean_jobserver_makeflags.
+# Test clean_jobserver_makeflags.
$ENV{MAKEFLAGS} = "--jobserver-fds=103,104 -j";
-closefd(103); closefd(104);
-ok(is_make_jobserver_unavailable(), "unavailable jobserver" );
clean_jobserver_makeflags();
ok(! exists $ENV{MAKEFLAGS}, "unset makeflags");
$ENV{MAKEFLAGS} = "-a --jobserver-fds=103,104 -j -b";
-closefd(103); closefd(104);
-ok(is_make_jobserver_unavailable(), "unavailable jobserver" );
clean_jobserver_makeflags();
is($ENV{MAKEFLAGS}, "-a -b", "clean makeflags");
$ENV{MAKEFLAGS} = " --jobserver-fds=1,2 -j ";
-# fds left open
-ok(! is_make_jobserver_unavailable(), "available jobserver" );
clean_jobserver_makeflags();
ok(! exists $ENV{MAKEFLAGS}, "unset makeflags");
$ENV{MAKEFLAGS} = "-a -j -b";
-ok(! is_make_jobserver_unavailable(), "no specified jobserver");
clean_jobserver_makeflags();
is($ENV{MAKEFLAGS}, "-a -j -b", "clean makeflags does not remove -j");
$ENV{MAKEFLAGS} = "-a --jobs -b";
-ok(! is_make_jobserver_unavailable(), "no specified jobserver");
clean_jobserver_makeflags();
is($ENV{MAKEFLAGS}, "-a --jobs -b", "clean makeflags does not remove --jobs");
$ENV{MAKEFLAGS} = "-j6";
-ok(! is_make_jobserver_unavailable(), "no specified jobserver");
clean_jobserver_makeflags();
is($ENV{MAKEFLAGS}, "-j6", "clean makeflags does not remove -j6");
$ENV{MAKEFLAGS} = "-a -j6 --jobs=7";
-ok(! is_make_jobserver_unavailable(), "no specified jobserver");
clean_jobserver_makeflags();
is($ENV{MAKEFLAGS}, "-a -j6 --jobs=7", "clean makeflags does not remove -j or --jobs");
-$ENV{MAKEFLAGS} = "-j6 --jobserver-fds=5,6 --jobs=8";
-closefd(5); closefd(6);
-ok(is_make_jobserver_unavailable(), "unavailable jobserver");
+$ENV{MAKEFLAGS} = "-j6 --jobserver-fds=103,104 --jobs=8";
clean_jobserver_makeflags();
is($ENV{MAKEFLAGS}, "-j6 --jobs=8", "jobserver options removed");