diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2007-01-18 08:42:31 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2007-01-18 08:42:31 +0000 |
commit | 13c0772a53a074124a35ad8af478042b7faf2a56 (patch) | |
tree | bdee1949823042fc05dd430be738316bff03c823 /dmake/tests | |
parent | 20b7b0c7a8c8c3073ea33f71c0e45d4d6d077838 (diff) |
INTEGRATION: CWS dmake47 (1.1.2); FILE ADDED
2006/11/20 17:16:49 vq 1.1.2.3: #i71777# Solaris testcase fixes.
2006/11/20 16:38:46 vq 1.1.2.2: #i71422# Fix testcase.
2006/11/13 20:39:11 vq 1.1.2.1: #i71422# Add testcases.
Diffstat (limited to 'dmake/tests')
-rwxr-xr-x | dmake/tests/recipes-6 | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/dmake/tests/recipes-6 b/dmake/tests/recipes-6 new file mode 100755 index 000000000000..2a0af305ef6a --- /dev/null +++ b/dmake/tests/recipes-6 @@ -0,0 +1,66 @@ +#!/bin/sh + +# 13.11.2006 Volker Quetschke +# Test @@ recipe property with group recipes. +# (issue 71422) + +: ${DMAKEPROG:=dmake} +file1="mfile1.mk" +file2="ofile1.out" +tmpfiles="$file1 $file2" + +trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15 + +trap 'rm -rf $tmpfiles' 1 2 3 15 + +# Remember to quote variables in generated makefiles( $ -> \$ ). +cat > $file1 <<EOT +# Test @@ recipe +SHELL*:=/bin/sh +SHELLFLAGS*:=-ce +GROUPSHELL*:=/bin/sh +GROUPSUFFIX:=.sh + +all : +@@[ + echo someoutput > $file2 + echo something +] +EOT + +output1=`eval ${DMAKEPROG} -r -f $file1` +result1=$? +if test "$output1" != ""; then + echo "Wrong result: $output1" + result1=1 +fi +if test -f $file2; then + if test `cat $file2` != "someoutput"; then + echo "Wrong file content: `cat $file2`" + result1=1 + fi +else + echo "No such file : $file2" + result1=1 +fi + +# Test if -vr enables the output again +output2=`eval ${DMAKEPROG} -vr -rf $file1` +result2=$? +if echo $output2 | grep -v 'echo someoutput > ofile1.out'; then + echo "Missing output: echo someoutput > ofile1.out" + result2=1 +fi +if echo $output2 | grep -v 'something'; then + echo "Missing output: something" + result2=1 +fi + +if test $result1 -eq 0 -a $result2 -eq 0; then + echo "Success - Cleaning up" + rm -f ${tmpfiles} + exit 0 +else + echo "Failure!" + exit 1 +fi |