From fba20a776da6d4a36db21d9b21e9e937bef00ac3 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Mon, 19 Jul 2010 07:10:53 +0000 Subject: - Many fixup patches from Savannah. - Fix the test suite on Solaris (from Boris) - Update the manual for .ONESHELL --- tests/scripts/variables/SHELL | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'tests/scripts/variables') diff --git a/tests/scripts/variables/SHELL b/tests/scripts/variables/SHELL index 69871d2..0028d9f 100644 --- a/tests/scripts/variables/SHELL +++ b/tests/scripts/variables/SHELL @@ -58,16 +58,27 @@ one two:;@echo "$@: $(SHELL) $$SHELL" # Test .SHELLFLAGS -run_make_test(q! +# We can't assume the value here: on Solaris for example, every line printed +# by the shell in -x mode has a trailing space (!!) +my $script = 'true'; +my $out = `/bin/sh -xc '$script' 2>&1`; + +run_make_test(qq! .SHELLFLAGS = -xc -all: ; @true +all: ; \@$script !, - '', "+ true\n"); + '', $out); + +# We can't just use "false" because on different systems it provides a +# different exit code. + +my $script = 'r() { return 1; }; true; r; true'; +my $out = `/bin/sh -xec '$script' 2>&1`; -run_make_test(q! +run_make_test(qq! .SHELLFLAGS = -xec -all: ; @true; false; true +all: ; \@$script !, - '', "+ true\n+ false\n#MAKE#: *** [all] Error 1\n", 512); + '', "$out#MAKE#: *** [all] Error 1\n", 512); 1; -- cgit v1.2.3