summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-10-28 17:23:28 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-10-28 17:31:01 -0400
commit2ec1c8af7f5216b574a93240e2a68a896b0896c1 (patch)
treefa4089d38ff270035d797b63d7241406c4e02f9b /t
parent76719d85abaa3a536af862b0aac2307d735e84d8 (diff)
reduce amount of MAKEFLAGS cleaning
Now clean_jobserver_makeflags will only remove --jobserver settings from MAKEFLAGS. This is simpler and easier to understand than the old behavior, which, if there was no --jobserver, removed all -j and --jobs, while leaving those when removing --jobserver. This relies on -j options passed to make overriding -j settings in MAKEFLAGS. So we don't need to clean those out, we can just override them.
Diffstat (limited to 't')
-rwxr-xr-xt/buildsystems/buildsystem_tests26
1 files changed, 13 insertions, 13 deletions
diff --git a/t/buildsystems/buildsystem_tests b/t/buildsystems/buildsystem_tests
index 2f9a146..9d41f54 100755
--- a/t/buildsystems/buildsystem_tests
+++ b/t/buildsystems/buildsystem_tests
@@ -484,46 +484,46 @@ ok ( ! -e 'bld', "bld got deleted too" );
#### Test parallel building and related options / routines
@tmp = ( $ENV{MAKEFLAGS}, $ENV{DEB_BUILD_OPTIONS} );
-# Test is_make_jobserver_unavailable and clean_makeflags.
+# Test is_make_jobserver_unavailable and clean_jobserver_makeflags.
$ENV{MAKEFLAGS} = "--jobserver-fds=103,104 -j";
ok(is_make_jobserver_unavailable(), "unavailable jobserver" );
-clean_makeflags();
+clean_jobserver_makeflags();
ok(! exists $ENV{MAKEFLAGS}, "unset makeflags");
$ENV{MAKEFLAGS} = "-a --jobserver-fds=103,104 -j -b";
ok(is_make_jobserver_unavailable(), "unavailable jobserver" );
-clean_makeflags();
+clean_jobserver_makeflags();
is($ENV{MAKEFLAGS}, "-a -b", "clean makeflags");
$ENV{MAKEFLAGS} = " --jobserver-fds=1,2 -j ";
ok(! is_make_jobserver_unavailable(), "available jobserver" );
-clean_makeflags();
+clean_jobserver_makeflags();
ok(! exists $ENV{MAKEFLAGS}, "unset makeflags");
$ENV{MAKEFLAGS} = "-a -j -b";
ok(! is_make_jobserver_unavailable(), "no specified jobserver");
-clean_makeflags();
-is($ENV{MAKEFLAGS}, "-a -b", "clean makeflags");
+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_makeflags();
-is($ENV{MAKEFLAGS}, "-a -b", "clean makeflags");
+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_makeflags();
-ok(! exists $ENV{MAKEFLAGS}, "unset makeflags");
+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_makeflags();
-is($ENV{MAKEFLAGS}, "-a", "clean makeflags");
+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";
ok(is_make_jobserver_unavailable(), "unavailable jobserver");
-clean_makeflags();
+clean_jobserver_makeflags();
is($ENV{MAKEFLAGS}, "-j6 --jobs=8", "jobserver options removed");
# Test parallel building with makefile build system.