diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2007-01-18 08:41:58 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2007-01-18 08:41:58 +0000 |
commit | d46698a4c720a2fb02b4ec0a8fa9e02f9a45ecd7 (patch) | |
tree | dd08592eca61fdbb54cc79be2fc23a101f16d144 /dmake/tests | |
parent | ba5a9662069bbe9f440fae86f7b81ee82c321563 (diff) |
INTEGRATION: CWS dmake47 (1.1.2); FILE ADDED
2006/11/17 23:09:19 vq 1.1.2.1: #i61856# Add testcase.
Diffstat (limited to 'dmake/tests')
-rwxr-xr-x | dmake/tests/misc-16 | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/dmake/tests/misc-16 b/dmake/tests/misc-16 new file mode 100755 index 000000000000..2e234d3d15a1 --- /dev/null +++ b/dmake/tests/misc-16 @@ -0,0 +1,48 @@ +#!/bin/sh + +# 17.11.2006 Volker Quetschke +# Check that parallel builds $(shell ...) only waits its own target and +# not for all previous recipe lines. +# (issue 61856) + +: ${DMAKEPROG:=dmake} +file1="mfile1.mk" +file2="mytarget.dpcc" +tmpfiles="$file1 $file2" + +trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15 + +# Remove files from prior failed run +rm -rf $tmpfiles + +# Remember to quote variables in generated makefiles( $ -> \$ ). +cat > $file1 <<EOT +SHELL*:=/bin/sh +SHELLFLAGS*:=-ce + +all : all1 all2 + @+echo all + +all1 : + @+printf "1" + @+sleep 2 + @+printf "4" + +all2 : + @+sleep 1 + @+printf "2" + @+printf "\$(shell @+echo "3")" + +EOT + +output=`eval ${DMAKEPROG} -r -P2 -f $file1` +result=$? + +if test "$output" != "1234all"; then + echo "Wrong result: $output - expecting: 1234all" + result=1 +fi + +test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles} +test $result -ne 0 && echo "Failure!" +exit $result |