summaryrefslogtreecommitdiff
path: root/tests/scripts/targets/POSIX
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2010-07-28 05:39:50 +0000
committerPaul Smith <psmith@gnu.org>2010-07-28 05:39:50 +0000
commit95f1a32d27eef91a8a037522467d7060e7da2624 (patch)
tree5425627c23c80a78e77fbc4f6d51b08c5bad1874 /tests/scripts/targets/POSIX
parent59691939f93130491768297080773d91aaa3a3d0 (diff)
downloadgunmake-95f1a32d27eef91a8a037522467d7060e7da2624.tar.gz
Release GNU make 3.823.82
- Update tests for Solaris bizarre-ness - Update files for release
Diffstat (limited to 'tests/scripts/targets/POSIX')
-rw-r--r--tests/scripts/targets/POSIX27
1 files changed, 16 insertions, 11 deletions
diff --git a/tests/scripts/targets/POSIX b/tests/scripts/targets/POSIX
index 1b57448..9c30e18 100644
--- a/tests/scripts/targets/POSIX
+++ b/tests/scripts/targets/POSIX
@@ -6,23 +6,28 @@ $details = "";
# Ensure turning on .POSIX enables the -e flag for the shell
-# We can't just use "false" because on different systems it provides a
-# different exit code.
-
-run_make_test(q!
+# We can't assume the exit value of "false" because on different systems it's
+# different.
+
+my $script = 'false; true';
+my $flags = '-ec';
+my $out = `/bin/sh $flags '$script' 2>&1`;
+my $err = $? >> 8;
+run_make_test(qq!
.POSIX:
-all: ; @r() { return 1; }; r; true
+all: ; \@$script
!,
- '', "#MAKE#: *** [all] Error 1\n", 512);
+ '', "#MAKE#: *** [all] Error $err\n", 512);
# User settings must override .POSIX
-
-run_make_test(q!
-.SHELLFLAGS = -xc
+$flags = '-xc';
+$out = `/bin/sh $flags '$script' 2>&1`;
+run_make_test(qq!
+.SHELLFLAGS = $flags
.POSIX:
-all: ; @r() { return 1; }; r; true
+all: ; \@$script
!,
- '', "+ r\n+ return 1\n+ true\n");
+ '', $out);
# This tells the test driver that the perl test script executed properly.
1;