summaryrefslogtreecommitdiff
path: root/tests/scripts
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2023-01-15 10:53:38 -0500
committerPaul Smith <psmith@gnu.org>2023-01-15 16:35:57 -0500
commitd2bf740e779cbbc599a664466a55be9fa5539a3e (patch)
treea7cc240f43c86fdfed27e682b5b011fe767bacc7 /tests/scripts
parenta8890796a439941bee9bc027b31430aec1b334e6 (diff)
downloadmake-git-d2bf740e779cbbc599a664466a55be9fa5539a3e.tar.gz
* tests/test_driver.pl: Convert z/OS answers for regex output
Allow z/OS customizations to apply to regex output matching. * tests/scripts/features/output-sync: Use a regex for Terminated. * tests/scripts/features/temp_stdin: Ditto.
Diffstat (limited to 'tests/scripts')
-rw-r--r--tests/scripts/features/output-sync12
-rw-r--r--tests/scripts/features/temp_stdin13
2 files changed, 12 insertions, 13 deletions
diff --git a/tests/scripts/features/output-sync b/tests/scripts/features/output-sync
index 20004e78..a87df637 100644
--- a/tests/scripts/features/output-sync
+++ b/tests/scripts/features/output-sync
@@ -353,15 +353,15 @@ s/\r?\n//g;
if (/^[0-9]+$/) {
use POSIX ();
# SV 63157.
-# Test that make removes temporary files, even when a signal is received.
-# The general test_driver postprocessing will ensure the temporary file used
-# to synchronize output and the jobserver fifo are both removed.
-# sleep is needed to let make write its "... Terminated" message to the log
-# file.
+# Test that make removes temporary files, even when a signal is received. The
+# general test_driver postprocessing will ensure the temporary file used to
+# synchronize output and the jobserver fifo are both removed. sleep is needed
+# to let make write its "... Terminated" message to the log file. Must use
+# REGEX because some systems (MacOS) add extra text after Terminated.
run_make_test(q!
pid:=$(shell echo $$PPID)
all:; @#HELPER# -q term $(pid) sleep 10
-!, '-O -j2', '#MAKE#: *** [#MAKEFILE#:3: all] Terminated', POSIX::SIGTERM);
+!, '-O -j2', '/#MAKE#: \*\*\* \[#MAKEFILE#:3: all] Terminated/', POSIX::SIGTERM);
}
unlink($fout);
diff --git a/tests/scripts/features/temp_stdin b/tests/scripts/features/temp_stdin
index d7dde709..fee32a90 100644
--- a/tests/scripts/features/temp_stdin
+++ b/tests/scripts/features/temp_stdin
@@ -58,12 +58,11 @@ use POSIX ();
# sv 63157.
# Test that make removes the temporary file which holds make code from stdin,
-# even when a signal is received.
-# include bye.mk and bye.mk: rule is needed to cause make to keep the temporary
-# file for re-exec. Without re-exec make will remove the file before the signal
-# arrives.
-# sleep is needed to let make write its "... Terminated" message to the log
-# file.
+# even when a signal is received. include bye.mk and bye.mk: rule is needed
+# to cause make to keep the temporary file for re-exec. Without re-exec make
+# will remove the file before the signal arrives. sleep is needed to let make
+# write its "... Terminated" message to the log file. Must use REGEX because
+# some systems (MacOS) add extra text after Terminated.
&utouch(-600, 'bye.mk');
close(STDIN);
open(STDIN, "<", 'input.mk') || die "$0: cannot open input.mk for reading: $!";
@@ -75,7 +74,7 @@ all:;
bye.mk: force; @#HELPER# -q term $(pid) sleep 10
force:
!,
- '-f-', '#MAKE#: *** [#MAKEFILE#:5: bye.mk] Terminated', POSIX::SIGTERM);
+ '-f-', '/#MAKE#: \*\*\* \[#MAKEFILE#:5: bye.mk] Terminated/', POSIX::SIGTERM);
}
unlink($fout);