summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-10-29 16:32:29 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-10-29 16:33:16 -0400
commita4a29fb6c4ae999ff732a0b9479a767f685cad2f (patch)
treec59383cc93ebfb8c85bfd7bc251ebb1266d64c96 /t
parent2a9c750718dc42c39b3ccfd52aa271cda038e6d1 (diff)
update test suite for implicit parallelisation and flag rename
Diffstat (limited to 't')
-rwxr-xr-xt/buildsystems/buildsystem_tests52
1 files changed, 25 insertions, 27 deletions
diff --git a/t/buildsystems/buildsystem_tests b/t/buildsystems/buildsystem_tests
index 9d41f54..16a8a75 100755
--- a/t/buildsystems/buildsystem_tests
+++ b/t/buildsystems/buildsystem_tests
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-use Test::More tests => 281;
+use Test::More tests => 280;
use strict;
use warnings;
@@ -406,16 +406,16 @@ EOF
$tmp = Cwd::getcwd();
# NOTE: disabling parallel building explicitly (it might get automatically
# enabled if run under dpkg-buildpackage -jX) to make output deterministic.
-is_deeply( process_stdout("$^X -- - --builddirectory='autoconf/bld dir' --sourcedirectory autoconf --parallel=1",
+is_deeply( process_stdout("$^X -- - --builddirectory='autoconf/bld dir' --sourcedirectory autoconf --max-parallel=1",
get_load_bs_source(undef, "configure")),
[ 'NAME=autoconf', 'builddir=autoconf/bld dir', "cwd=$tmp", 'makecmd=make', 'parallel=1', 'sourcedir=autoconf' ],
"autoconf autoselection and sourcedir/builddir" );
-is_deeply( process_stdout("$^X -- - -Sautoconf -D autoconf --parallel=1", get_load_bs_source("autoconf", "build")),
+is_deeply( process_stdout("$^X -- - -Sautoconf -D autoconf --max-parallel=1", get_load_bs_source("autoconf", "build")),
[ 'NAME=autoconf', 'builddir=undef', "cwd=$tmp", 'makecmd=make', 'parallel=1', 'sourcedir=autoconf' ],
"forced autoconf and sourcedir" );
-is_deeply( process_stdout("$^X -- - -B -Sautoconf --parallel=1", get_load_bs_source("autoconf", "build")),
+is_deeply( process_stdout("$^X -- - -B -Sautoconf --max-parallel=1", get_load_bs_source("autoconf", "build")),
[ 'NAME=autoconf', "builddir=$default_builddir", "cwd=$tmp", 'makecmd=make', 'parallel=1', 'sourcedir=.' ],
"forced autoconf and default build directory" );
@@ -557,33 +557,33 @@ sub test_is_parallel {
test_isnt_parallel( do_parallel_mk(),
"No parallel by default" );
-test_isnt_parallel( do_parallel_mk("--parallel"),
- "No parallel by default with --parallel" );
+test_isnt_parallel( do_parallel_mk("--max-parallel"),
+ "No parallel by default with --max-parallel" );
$ENV{DEB_BUILD_OPTIONS}="parallel=5";
-test_isnt_parallel( do_parallel_mk(),
- "DEB_BUILD_OPTIONS=parallel=5 without --parallel" );
-test_is_parallel( do_parallel_mk("--parallel"),
- "DEB_BUILD_OPTIONS=parallel=5 with --parallel" );
-test_is_parallel( do_parallel_mk("--parallel=2"),
- "DEB_BUILD_OPTIONS=parallel=5 with --parallel=2" );
-test_isnt_parallel( do_parallel_mk("--parallel=1"),
- "DEB_BUILD_OPTIONS=parallel=5 with --parallel=1 (off)" );
+test_is_parallel( do_parallel_mk(),
+ "DEB_BUILD_OPTIONS=parallel=5 without --max-parallel" );
+test_is_parallel( do_parallel_mk("--max-parallel"),
+ "DEB_BUILD_OPTIONS=parallel=5 with --max-parallel" );
+test_is_parallel( do_parallel_mk("--max-parallel=2"),
+ "DEB_BUILD_OPTIONS=parallel=5 with --max-parallel=2" );
+test_isnt_parallel( do_parallel_mk("--max-parallel=1"),
+ "DEB_BUILD_OPTIONS=parallel=5 with --max-parallel=1 (off)" );
$ENV{MAKEFLAGS} = "--jobserver-fds=105,106 -j";
$ENV{DEB_BUILD_OPTIONS}="";
test_isnt_parallel( do_parallel_mk(),
"makefile.pm (no parallel): no make warnings about unavailable jobserver" );
$ENV{DEB_BUILD_OPTIONS}="parallel=5";
-test_is_parallel( do_parallel_mk("--parallel"),
- "DEB_BUILD_OPTIONS=parallel=5 with --parallel: no make warnings about unavail parent jobserver" );
+test_is_parallel( do_parallel_mk(),
+ "DEB_BUILD_OPTIONS=parallel=5: no make warnings about unavail parent jobserver" );
$ENV{MAKEFLAGS} = "-j2";
$ENV{DEB_BUILD_OPTIONS}="";
-test_is_parallel( do_parallel_mk(),
- "MAKEFLAGS=-j2 without --parallel: dh_auto_build honours MAKEFLAGS" );
-test_isnt_parallel( do_parallel_mk("--parallel=1"),
- "MAKEFLAGS=-j2 with --parallel=1: dh_auto_build enforces -j1" );
+test_isnt_parallel( do_parallel_mk(),
+ "MAKEFLAGS=-j2: dh_auto_build ignores MAKEFLAGS" );
+test_isnt_parallel( do_parallel_mk("--max-parallel=1"),
+ "MAKEFLAGS=-j2 with --max-parallel=1: dh_auto_build enforces -j1" );
# Test dh dpkg-buildpackage -jX detection
sub do_rules_for_parallel {
@@ -614,22 +614,20 @@ sub test_dh_parallel {
@dh --buildsystem=makefile --after=dh_auto_configure --until=dh_auto_build $@
@dh_clean > /dev/null 2>&1
EOF
- test_is_parallel( do_rules_for_parallel("build", $rules),
- "dh adds --parallel implicitly under dpkg-buildpackage -j5 $extra_dsc");
$ENV{MAKEFLAGS} = "";
- test_isnt_parallel( do_rules_for_parallel("build", $rules),
+ test_is_parallel( do_rules_for_parallel("build", $rules),
"DEB_BUILD_OPTIONS=parallel=5 without MAKEFLAGS=-jX via dh $extra_dsc" );
$ENV{MAKEFLAGS} = "-j5";
$rules = <<'EOF';
%:
@dh_clean > /dev/null 2>&1
- @dh -j1 --buildsystem=makefile --after=dh_auto_configure --until=dh_auto_build $@
+ @dh --max-parallel=1 --buildsystem=makefile --after=dh_auto_configure --until=dh_auto_build $@
@dh_clean > /dev/null 2>&1
EOF
test_isnt_parallel( do_rules_for_parallel("build", $rules),
- "dh -j1 disables implicit parallel under dpkg-buildpackage -j5 $extra_dsc");
+ "dh --max-parallel=1 disables implicit parallel under dpkg-buildpackage -j5 $extra_dsc");
$rules = <<'EOF';
%:
@@ -682,8 +680,8 @@ override_dh_auto_build:
@+dh --buildsystem=makefile --after=dh_auto_configure --until=dh_auto_build $@
@dh_clean > /dev/null 2>&1
EOF
-test_isnt_parallel( do_rules_for_parallel("build", "include debian/rules"),
- "legacy punctuation hacks: +dh, override without +, no parallel, no make warnings" );
+test_is_parallel( do_rules_for_parallel("build", "include debian/rules"),
+ "legacy punctuation hacks: +dh, override without +, parallel, no make warnings" );
unlink "debian/rules";
write_debian_rules(<<'EOF');