summaryrefslogtreecommitdiff
path: root/dmake/tests/infra-0
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-04-20 11:17:40 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-04-20 11:17:40 +0000
commit0ddb2f4617496d8ed114fa94e07b2fd7960238d5 (patch)
tree9aba7000b75d5e62f6198423e6a9e050bc2f21b3 /dmake/tests/infra-0
parentc39ca2825111eac7104d0eb0ced1e31550ec995c (diff)
INTEGRATION: CWS dmake43p01 (1.1.2); FILE ADDED
2005/06/02 03:41:20 vq 1.1.2.1: #i39248# Add testsuite for dmake (only tor targets using the autotools).
Diffstat (limited to 'dmake/tests/infra-0')
-rwxr-xr-xdmake/tests/infra-042
1 files changed, 42 insertions, 0 deletions
diff --git a/dmake/tests/infra-0 b/dmake/tests/infra-0
new file mode 100755
index 000000000000..97c2962be3d8
--- /dev/null
+++ b/dmake/tests/infra-0
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+# 01.06.2005 Volker Quetschke
+# Basic test of dmake existence and the needed infrastructure.
+
+: ${DMAKEPROG:=dmake}
+file1="mymakefile.mk"
+file2="mytestfile"
+tmpfiles="$file1 $file2"
+
+trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
+
+# Test for "test" programm in path
+which test > /dev/null || { echo "Failure! \"test\" program missing." ; exit 1; }
+echo "Found \"test\" program."
+
+# Test for "echo" programm in path
+which echo > /dev/null || { echo "Failure! \"echo\" program missing." ; exit 1; }
+echo "Found \"echo\" program."
+
+# Test for dmake program
+test -x "${DMAKEPROG}" || { echo "Failure! \"dmake\" is missing." ; exit 1; }
+echo "Found \"dmake\" program."
+
+# Remember to quote variables in generated makefiles( $ -> \$ ).
+cat > $file1 <<EOT
+# simple makefile
+${file2}:
+ @echo 'Generating ${file2}'
+ touch ${file2}
+EOT
+
+${DMAKEPROG} -r -f $file1
+result=$?
+if test ! -e "${file2}"; then
+ echo "File missing"
+ result=1
+fi
+
+test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
+test $result -ne 0 && echo "Failure!"
+exit $result \ No newline at end of file