diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-11-05 11:16:30 -0800 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2012-11-05 11:16:30 -0800 |
commit | 9789b4dba120180760ec948089fc98ebab6eb28b (patch) | |
tree | 26ae9736985be2ef61032e7808b9fb0e2155c71f /tests/scripts/targets/POSIX | |
download | make-9789b4dba120180760ec948089fc98ebab6eb28b.tar.gz make-9789b4dba120180760ec948089fc98ebab6eb28b.tar.bz2 make-9789b4dba120180760ec948089fc98ebab6eb28b.zip |
Imported Upstream version 3.82upstream/3.82
Diffstat (limited to 'tests/scripts/targets/POSIX')
-rw-r--r-- | tests/scripts/targets/POSIX | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/scripts/targets/POSIX b/tests/scripts/targets/POSIX new file mode 100644 index 0000000..9c30e18 --- /dev/null +++ b/tests/scripts/targets/POSIX @@ -0,0 +1,33 @@ +# -*-perl-*- + +$description = "Test the behaviour of the .PHONY target."; + +$details = ""; + + +# Ensure turning on .POSIX enables the -e flag for the shell +# 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: ; \@$script +!, + '', "#MAKE#: *** [all] Error $err\n", 512); + +# User settings must override .POSIX +$flags = '-xc'; +$out = `/bin/sh $flags '$script' 2>&1`; +run_make_test(qq! +.SHELLFLAGS = $flags +.POSIX: +all: ; \@$script +!, + '', $out); + +# This tells the test driver that the perl test script executed properly. +1; |