From c2792d6129fe9b13efba159126430d657f447033 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sat, 1 Apr 2023 15:57:04 -0400 Subject: Adjust output strings to be aligned Change error and fatal messages to start with lowercase and not end with a period. Note a few very common messages were left as-is, just in case some other tools parse them. Also modify the test known-good-output to satisfy the messages. --- tests/scripts/features/double_colon | 2 +- tests/scripts/features/implicit_search | 2 +- tests/scripts/features/include | 6 +++--- tests/scripts/features/jobserver | 10 +++++----- tests/scripts/features/mult_rules | 14 ++++++++------ tests/scripts/features/patternrules | 6 +++--- tests/scripts/features/se_explicit | 12 ++++++------ tests/scripts/functions/shell | 2 +- tests/scripts/options/dash-B | 3 ++- tests/scripts/options/dash-W | 5 ++++- tests/scripts/options/dash-k | 2 +- tests/scripts/options/shuffle | 2 +- tests/scripts/targets/DELETE_ON_ERROR | 4 ++-- tests/test_driver.pl | 12 ++++++------ 14 files changed, 44 insertions(+), 38 deletions(-) (limited to 'tests') diff --git a/tests/scripts/features/double_colon b/tests/scripts/features/double_colon index a039b0a9..7b55440b 100644 --- a/tests/scripts/features/double_colon +++ b/tests/scripts/features/double_colon @@ -83,7 +83,7 @@ if ($parallel_jobs) { # TEST 8: Test circular dependency check; PR/1671 -run_make_test(undef, "d", "ok\n$make_name: Circular d <- d dependency dropped.\noops\n"); +run_make_test(undef, "d", "ok\n$make_name: circular d <- d dependency dropped\noops\n"); # TEST 8: I don't grok why this is different than the above, but it is... # diff --git a/tests/scripts/features/implicit_search b/tests/scripts/features/implicit_search index 57782c94..09cf4d79 100644 --- a/tests/scripts/features/implicit_search +++ b/tests/scripts/features/implicit_search @@ -177,7 +177,7 @@ all: hello.tsk %.o:$r %.c; \$(info hello.c) %.o:$r %.f %.tsk; \$(info hello.f) ", '-r', -"#MAKE#: Circular hello.o <- hello.tsk dependency dropped.\nhello.f\nhello.tsk\n#MAKE#: Nothing to be done for 'all'."); +"#MAKE#: circular hello.o <- hello.tsk dependency dropped\nhello.f\nhello.tsk\n#MAKE#: Nothing to be done for 'all'."); } diff --git a/tests/scripts/features/include b/tests/scripts/features/include index cedabf7f..c20e185b 100644 --- a/tests/scripts/features/include +++ b/tests/scripts/features/include @@ -432,9 +432,9 @@ all:; @echo hello include inc_b.mk %_a.mk %_b.mk:; exit 1 !, - '', "exit 1\n#MAKEFILE#:4: Failed to remake makefile 'inc_b.mk'.\n", 512); + '', "exit 1\n#MAKEFILE#:4: failed to remake makefile 'inc_b.mk'", 512); -run_make_test(undef, '-k', "exit 1\n#MAKEFILE#:4: Failed to remake makefile 'inc_b.mk'.\n", 512); +run_make_test(undef, '-k', "exit 1\n#MAKEFILE#:4: failed to remake makefile 'inc_b.mk'", 512); # It seems wrong to me that this gives a different error message, but at # least it doesn't keep going. @@ -446,7 +446,7 @@ include inc_a.mk !, '', "exit 1\n#MAKEFILE#:3: inc_a.mk: $ERR_no_such_file\n#MAKE#: *** [#MAKEFILE#:5: inc_a.mk] Error 1\n", 512); -run_make_test(undef, '-k', "exit 1\n#MAKEFILE#:3: inc_a.mk: $ERR_no_such_file\n#MAKE#: *** [#MAKEFILE#:5: inc_a.mk] Error 1\n#MAKEFILE#:3: Failed to remake makefile 'inc_a.mk'.\n", 512); +run_make_test(undef, '-k', "exit 1\n#MAKEFILE#:3: inc_a.mk: $ERR_no_such_file\n#MAKE#: *** [#MAKEFILE#:5: inc_a.mk] Error 1\n#MAKEFILE#:3: failed to remake makefile 'inc_a.mk'", 512); # Check the default makefiles... this requires us to invoke make with no # arguments. Also check MAKEFILES diff --git a/tests/scripts/features/jobserver b/tests/scripts/features/jobserver index ad5f9e7f..f8cae542 100644 --- a/tests/scripts/features/jobserver +++ b/tests/scripts/features/jobserver @@ -14,7 +14,7 @@ if (!$parallel_jobs) { # Shorthand my $np = '--no-print-directory'; -my $j1err = "warning: jobserver unavailable: using -j1. Add '+' to parent make rule."; +my $j1err = "warning: jobserver unavailable: using -j1 (add '+' to parent make rule)"; # Simple test of MAKEFLAGS settings run_make_test(q! @@ -42,7 +42,7 @@ recurse: ; @echo $@: "/$(SHOW)/"; $(MAKE) -j3 -f #MAKEFILE# recurse2 recurse2: ; @echo $@: "/$(SHOW)/"; $(MAKE) -f #MAKEFILE# all all:;@echo $@: "/$(SHOW)/" !, - "-j2 $np", "recurse: /-j2 --jobserver-auth= $np/\n#MAKE#[1]: warning: -j3 forced in submake: resetting jobserver mode.\nrecurse2: /-j3 --jobserver-auth= $np/\nall: /-j3 --jobserver-auth= $np/\n"); + "-j2 $np", "recurse: /-j2 --jobserver-auth= $np/\n#MAKE#[1]: warning: -j3 forced in submake: resetting jobserver mode\nrecurse2: /-j3 --jobserver-auth= $np/\nall: /-j3 --jobserver-auth= $np/\n"); # Test override of -jN with -j run_make_test(q! @@ -51,7 +51,7 @@ recurse: ; @echo $@: "/$(SHOW)/"; $(MAKE) -j -f #MAKEFILE# recurse2 recurse2: ; @echo $@: "/$(SHOW)/"; $(MAKE) -f #MAKEFILE# all all:;@echo $@: "/$(SHOW)/" !, - "-j2 $np", "recurse: /-j2 --jobserver-auth= $np/\n#MAKE#[1]: warning: -j0 forced in submake: resetting jobserver mode.\nrecurse2: /-j $np/\nall: /-j $np/\n"); + "-j2 $np", "recurse: /-j2 --jobserver-auth= $np/\n#MAKE#[1]: warning: -j0 forced in submake: resetting jobserver mode\nrecurse2: /-j $np/\nall: /-j $np/\n"); # Don't put --jobserver-auth into a re-exec'd MAKEFLAGS. # We can't test this directly because there's no way a makefile can @@ -76,7 +76,7 @@ inc.mk: #> @echo 'MAKEFLAGS = $(MAKEFLAGS)' > @echo 'FOO = bar' > $@ !, - "$np -j2", "#MAKE#[1]: warning: -j2 forced in submake: resetting jobserver mode.\nall\n"); + "$np -j2", "#MAKE#[1]: warning: -j2 forced in submake: resetting jobserver mode\nall\n"); unlink('inc.mk'); @@ -118,7 +118,7 @@ recurse: ; @echo hi !, '-w -j2', "#MAKE#: Entering directory '#PWD#' #MAKE#[1]: Entering directory '#PWD#' -#MAKE#[1]: warning: -j1 forced in submake: resetting jobserver mode. +#MAKE#[1]: warning: -j1 forced in submake: resetting jobserver mode hi #MAKE#[1]: Leaving directory '#PWD#' #MAKE#: Leaving directory '#PWD#'\n"); diff --git a/tests/scripts/features/mult_rules b/tests/scripts/features/mult_rules index bddd501c..ca6a1afe 100644 --- a/tests/scripts/features/mult_rules +++ b/tests/scripts/features/mult_rules @@ -1,3 +1,5 @@ +# -*-perl-*- + $description = "\ The following test creates a makefile to test the presence of multiple rules for one target. One file can be the @@ -21,8 +23,8 @@ print MAKEFILE <> a.x'); # Put the timestamp for a.x into the future; it should still be remade. - +# There are clock skew errors printed here but they will be cleared by +# the comparison code. utouch(1000, 'a.x'); run_make_test(undef, '', "#MAKE#: 'a.x' is up to date."); run_make_test(undef, '-W b.x', 'echo >> a.x'); @@ -50,6 +51,8 @@ touch baz.x'); # Now run with -W bar.x # Tweak foo.x's timestamp so the update will change it. +# There are clock skew errors printed here but they will be cleared by +# the comparison code. &utouch(1000, 'foo.x'); run_make_test(undef, '-W bar.x', "restarts=\ntouch foo.x\nrestarts=1\ntouch baz.x"); diff --git a/tests/scripts/options/dash-k b/tests/scripts/options/dash-k index 4bd68f03..fec630c3 100644 --- a/tests/scripts/options/dash-k +++ b/tests/scripts/options/dash-k @@ -108,7 +108,7 @@ ifile: no-such-file; exit 1 '-k', "#MAKEFILE#:2: ifile: $ERR_no_such_file #MAKE#: *** No rule to make target 'no-such-file', needed by 'ifile'. -#MAKEFILE#:2: Failed to remake makefile 'ifile'.\n", +#MAKEFILE#:2: failed to remake makefile 'ifile'", 512); } diff --git a/tests/scripts/options/shuffle b/tests/scripts/options/shuffle index 5661683c..c19128f7 100644 --- a/tests/scripts/options/shuffle +++ b/tests/scripts/options/shuffle @@ -92,7 +92,7 @@ all: a_ b_ ; @echo $@ a_: b_ b_: a_ ', - '--shuffle=reverse', "#MAKE#: Circular a_ <- b_ dependency dropped.\na_\nb_\nall"); + '--shuffle=reverse', "#MAKE#: circular a_ <- b_ dependency dropped\na_\nb_\nall"); # Check if order-only dependencies get reordered. run_make_test(' diff --git a/tests/scripts/targets/DELETE_ON_ERROR b/tests/scripts/targets/DELETE_ON_ERROR index f0d9f9b4..f9ed88aa 100644 --- a/tests/scripts/targets/DELETE_ON_ERROR +++ b/tests/scripts/targets/DELETE_ON_ERROR @@ -8,7 +8,7 @@ run_make_test(' .DELETE_ON_ERROR: all: ; exit 1 > $@ ', - '', "exit 1 > all\n#MAKE#: *** [#MAKEFILE#:3: all] Error 1\n#MAKE#: *** Deleting file 'all'", 512); + '', "exit 1 > all\n#MAKE#: *** [#MAKEFILE#:3: all] Error 1\n#MAKE#: *** deleting file 'all'", 512); run_make_test(' .DELETE_ON_ERROR: @@ -16,7 +16,7 @@ all: foo.x ; %.x : %.q ; echo > $@ %.q : ; exit 1 > $@ ', - '', "exit 1 > foo.q\n#MAKE#: *** [#MAKEFILE#:5: foo.q] Error 1\n#MAKE#: *** Deleting file 'foo.q'", 512); + '', "exit 1 > foo.q\n#MAKE#: *** [#MAKEFILE#:5: foo.q] Error 1\n#MAKE#: *** deleting file 'foo.q'", 512); # This tells the test driver that the perl test script executed properly. 1; diff --git a/tests/test_driver.pl b/tests/test_driver.pl index 93801956..b3a8cd2c 100644 --- a/tests/test_driver.pl +++ b/tests/test_driver.pl @@ -912,12 +912,12 @@ sub convert_answer_zos my ($log) = @_; # z/OS emits "Error 143" or "SIGTERM" instead of terminated - $log =~ s/Error 143/Terminated/gm; - $log =~ s/SIGTERM/Terminated/gm; + $log =~ s/Error 143/Terminated/igm; + $log =~ s/SIGTERM/Terminated/igm; # z/OS error messages have a prefix - $log =~ s/EDC5129I No such file or directory\./No such file or directory/gm; - $log =~ s/FSUM7351 not found/not found/gm; + $log =~ s/EDC5129I No such file or directory\./No such file or directory/igm; + $log =~ s/FSUM7351 not found/not found/igm; return $log; } @@ -929,8 +929,8 @@ sub compare_answer # For make, get rid of any time skew error before comparing--too bad this # has to go into the "generic" driver code :-/ - $log =~ s/^.*modification time .*in the future.*\n//gm; - $log =~ s/^.*Clock skew detected.*\n//gm; + $log =~ s/^.*modification time .*in the future.*\n//igm; + $log =~ s/^.*clock skew detected.*\n//igm; return 1 if ($log eq $kgo); # Get rid of newline differences, forever -- cgit v1.2.1