diff options
author | Paul Smith <psmith@gnu.org> | 2000-04-22 02:11:17 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2000-04-22 02:11:17 +0000 |
commit | 5ed9fb46b28be4a703c1d88915fa150f0b74d5f4 (patch) | |
tree | 61047b6120465235eb65f70345fb3afd4b8a063b /tests | |
parent | f9c91ec34d9427c35bceec9b025a0bb20c9ec17f (diff) | |
download | make-git-5ed9fb46b28be4a703c1d88915fa150f0b74d5f4.tar.gz |
* Various bug fixes.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ChangeLog | 15 | ||||
-rw-r--r-- | tests/scripts/features/double_colon | 40 | ||||
-rw-r--r-- | tests/scripts/features/reinvoke | 5 | ||||
-rw-r--r-- | tests/scripts/functions/strip | 8 |
4 files changed, 49 insertions, 19 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index aca72255..5e3d72aa 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,18 @@ +2000-04-11 Paul D. Smith <psmith@gnu.org> + + * scripts/functions/strip: Test empty value to strip (PR/1689). + +2000-04-08 Eli Zaretskii <eliz@is.elta.co.il> + + * scripts/features/reinvoke: Sleep before updating the target + files in the first test, to ensure its time stamp really gets + newer; otherwise Make might re-exec more than once. + +2000-04-07 Eli Zaretskii <eliz@is.elta.co.il> + + * scripts/features/double_colon: Don't run the parallel tests if + parallel jobs aren't supported. + 2000-04-04 Paul D. Smith <psmith@gnu.org> * scripts/functions/word: wordlist doesn't swap arguments anymore. diff --git a/tests/scripts/features/double_colon b/tests/scripts/features/double_colon index e0e53f03..3e140c72 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 dacfd337..3e9ae661 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 1f487c0f..8222433f 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; |