diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2007-01-18 08:41:49 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2007-01-18 08:41:49 +0000 |
commit | ba5a9662069bbe9f440fae86f7b81ee82c321563 (patch) | |
tree | 1b515474fb4ce512d3abf5eba4cbb6ecf4eb452f /dmake/tests | |
parent | d63b53b0523d231c5e2ec91c12270f09bd58aa6a (diff) |
INTEGRATION: CWS dmake47 (1.1.2); FILE ADDED
2006/11/20 17:16:49 vq 1.1.2.2: #i71777# Solaris testcase fixes.
2006/11/10 03:25:00 vq 1.1.2.1: #i69943# Add testcase to check directory caching with DOS style path
targets on cygwin dmake.
Diffstat (limited to 'dmake/tests')
-rwxr-xr-x | dmake/tests/misc-15 | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/dmake/tests/misc-15 b/dmake/tests/misc-15 new file mode 100755 index 000000000000..1c52324a88d5 --- /dev/null +++ b/dmake/tests/misc-15 @@ -0,0 +1,53 @@ +#!/bin/sh + +# 09.11.2006 Volker Quetschke +# Check DOS style paths and directory caching with cygwin dmake or just +# normal paths with other versions. +# issue 69742, 69943 + +: ${DMAKEPROG:=dmake} +file1="mfile1.mk" +file2="target.abc" +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 + +echo "Something" > $file2 + +# Remember to quote variables in generated makefiles ( $ -> \$ ). +# Also quote line continuations ( \<nl> -> \\<nl> ). +cat > $file1 <<EOT +SHELL*:=/bin/sh +SHELLFLAGS*:=-ce + +.DIRCACHE=yes + +# Test if .SETDIR works with drive letters +.IF "\$(subst,Cygwin, \$(shell @uname))"!="\$(shell @uname)" +MYTARGET:=\$(shell @+cygpath -d "\$(PWD)")\target.abc +.ELSE +MYTARGET:=\$(PWD)/target.abc +.ENDIF + +"\$(MYTARGET)" : + @echo "Building \$@ - \$(MYTARGET)" + +EOT + +output=`eval ${DMAKEPROG} -r -f $file1` +result=$? + +if echo "$output" | grep "target.abc' is up to date" > /dev/null 2>&1 ; then + # OK + dummy=1 +else + echo "Wrong result: ${output}" + result=1 +fi + +test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles} +test $result -ne 0 && echo "Failure!" +exit $result |