From 5ed9fb46b28be4a703c1d88915fa150f0b74d5f4 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sat, 22 Apr 2000 02:11:17 +0000 Subject: * Various bug fixes. --- tests/scripts/features/double_colon | 40 +++++++++++++++++++++++-------------- tests/scripts/features/reinvoke | 5 +++-- tests/scripts/functions/strip | 8 ++++++-- 3 files changed, 34 insertions(+), 19 deletions(-) (limited to 'tests/scripts') diff --git a/tests/scripts/features/double_colon b/tests/scripts/features/double_colon index e0e53f0..3e140c7 100644 --- a/tests/scripts/features/double_colon +++ b/tests/scripts/features/double_colon @@ -51,9 +51,11 @@ $answer = "aaa\nbbb\n"; # TEST 1: As above, in parallel -&run_make_with_options($makefile, "-j10 all", &get_logfile, 0); -$answer = "aaa\nbbb\n"; -&compare_output($answer, &get_logfile(1)); +if ($parallel_jobs) { + &run_make_with_options($makefile, "-j10 all", &get_logfile, 0); + $answer = "aaa\nbbb\n"; + &compare_output($answer, &get_logfile(1)); +} # TEST 2: A simple double-colon rule that is the goal target @@ -63,9 +65,11 @@ $answer = "aaa\naaa done\nbbb\n"; # TEST 3: As above, in parallel -&run_make_with_options($makefile, "-j10 bar", &get_logfile, 0); -$answer = "aaa\naaa done\nbbb\n"; -&compare_output($answer, &get_logfile(1)); +if ($parallel_jobs) { + &run_make_with_options($makefile, "-j10 bar", &get_logfile, 0); + $answer = "aaa\naaa done\nbbb\n"; + &compare_output($answer, &get_logfile(1)); +} # TEST 4: Each double-colon rule is supposed to be run individually @@ -78,9 +82,11 @@ $answer = "f1.h\nfoo FIRST\n"; # TEST 5: Again, in parallel. -&run_make_with_options($makefile, "-j10 foo", &get_logfile, 0); -$answer = "f1.h\nfoo FIRST\n"; -&compare_output($answer, &get_logfile(1)); +if ($parallel_jobs) { + &run_make_with_options($makefile, "-j10 foo", &get_logfile, 0); + $answer = "f1.h\nfoo FIRST\n"; + &compare_output($answer, &get_logfile(1)); +} # TEST 6: Each double-colon rule is supposed to be run individually @@ -94,9 +100,11 @@ $answer = "f2.h\nfoo SECOND\n"; # TEST 7: Again, in parallel. -&run_make_with_options($makefile, "-j10 foo", &get_logfile, 0); -$answer = "f2.h\nfoo SECOND\n"; -&compare_output($answer, &get_logfile(1)); +if ($parallel_jobs) { + &run_make_with_options($makefile, "-j10 foo", &get_logfile, 0); + $answer = "f2.h\nfoo SECOND\n"; + &compare_output($answer, &get_logfile(1)); +} # TEST 8: Test circular dependency check; PR/1671 @@ -108,9 +116,11 @@ $answer = "ok\n$make_name: Circular d <- d dependency dropped.\noops\n"; # # Hmm... further testing indicates this might be timing-dependent? # -#&run_make_with_options($makefile, "-j10 biz", &get_logfile, 0); -#$answer = "aaa\ntwo\nbbb\n"; -#&compare_output($answer, &get_logfile(1)); +#if ($parallel_jobs) { +# &run_make_with_options($makefile, "-j10 biz", &get_logfile, 0); +# $answer = "aaa\ntwo\nbbb\n"; +# &compare_output($answer, &get_logfile(1)); +#} unlink('foo','f1.h','f2.h'); diff --git a/tests/scripts/features/reinvoke b/tests/scripts/features/reinvoke index dacfd33..3e9ae66 100644 --- a/tests/scripts/features/reinvoke +++ b/tests/scripts/features/reinvoke @@ -18,6 +18,7 @@ all: ; \@echo 'running rules.' $makefile $makefile2: $makefile_orig \@echo 'rebuilding \$\@.' + \@sleep $wtime \@echo >> \$\@ include $makefile2 @@ -30,7 +31,7 @@ close(MAKEFILE); # Sleep 2 seconds for DOS/Windows FAT volumes which have 2-second # granularity of file times. -sleep(2); +sleep($wtime); &touch("$makefile_orig"); @@ -67,7 +68,7 @@ close(MAKEFILE); &touch('b'); &touch('a'); -sleep(2); +sleep($wtime); &touch('c'); # First try with the file that's not updated "once removed" from the diff --git a/tests/scripts/functions/strip b/tests/scripts/functions/strip index 1f487c0..8222433 100644 --- a/tests/scripts/functions/strip +++ b/tests/scripts/functions/strip @@ -34,6 +34,8 @@ all: @echo '$(strip $(TEST2) )' @echo '$(strip $(TEST3) )' +space: ; @echo '$(strip ) $(strip )' + EOMAKE # END of Contents of MAKEFILE @@ -41,13 +43,15 @@ EOMAKE close(MAKEFILE); &run_make_with_options($makefile,"",&get_logfile); - -# Create the answer to what should be produced by this Makefile $answer = "\"Is this TERMINAL fun? What makes you believe is this terminal fun? JAPAN is a WONDERFUL planet -- I wonder if we will ever reach their level of COMPARATIVE SHOPPING...\" try this and this and these test out some blank lines "; +&compare_output($answer,&get_logfile(1)); + +&run_make_with_options($makefile,"space",&get_logfile); +$answer = " \n"; &compare_output($answer,&get_logfile(1)); 1; -- cgit v1.2.3