3 # 11.08.2007 Volker Quetschke
4 # Test that recipes with error can be ignored.
11 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
13 # Remove files from prior failed run
16 # Remember to quote variables in generated makefiles( $ -> \$ ).
17 # Test 1 - Ignore, but display failed execution.
27 output1
=`eval ${DMAKEPROG} -r -f $file1 2>&1`
30 if test "$result1" = "0" && echo $output1 |
grep '(Ignored)' > /dev
/null
2>&1 ; then
34 echo "Subtest 1: Wrong result: $output1"
40 # Test 2 - Ignore, but display failed execution.
50 output2
=`eval ${DMAKEPROG} -r -f $file1 2>&1`
53 if test "$result2" = "0" && echo $output2 |
grep '(Ignored)' > /dev
/null
2>&1 ; then
57 echo "Subtest 2: Wrong result: $output2"
74 output3
=`eval ${DMAKEPROG} -r -f $file1 2>&1`
76 if test $result3 != 0 && echo $output3 |
grep 'Error code -1, while making ' > /dev
/null
2>&1 ; then
80 echo "Subtest 3: Wrong result: $output3"
86 # Test 4 - Ignore a succesfully executed, but failing recipe.
96 output4
=`eval ${DMAKEPROG} -r -f $file1 2>&1`
99 if test "$result4" = "0" -a "$output4" = "false all" ; then
103 echo "Subtest 4: Wrong result: $output4"
110 if test $result1 -eq 0 -a $result2 -eq 0 \
111 -a $result3 -eq 0 -a $result4 -eq 0 ; then
112 echo "Success - Cleaning up" && rm -f ${tmpfiles}