summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authordeva <deva>2008-05-15 10:17:14 +0000
committerdeva <deva>2008-05-15 10:17:14 +0000
commitdd744c562f2f755a9fcd9ee5341c8c8702a9ee32 (patch)
tree8b105e0e86a960428e2de6e7d1108ddc3a26964f /tools
parent64a0aaaae8679b5f99f5bf1cf0a67489e85b5bd3 (diff)
*** empty log message ***
Diffstat (limited to 'tools')
-rwxr-xr-xtools/test35
1 files changed, 35 insertions, 0 deletions
diff --git a/tools/test b/tools/test
new file mode 100755
index 0000000..7e15b3d
--- /dev/null
+++ b/tools/test
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+TEST=`echo -n $1 | cut -d'.' -f1`
+UPPER=`echo $TEST | tr 'a-z.' 'A-Z_'`
+OUTPUT=test_$TEST
+DEFINE=TEST_$UPPER
+
+COMPILE="g++ -g -Wall -Werror -D$DEFINE -o $OUTPUT $*"
+
+echo Testing $TEST:
+echo Testing $TEST: > $OUTPUT.log
+
+echo -n "* Compiling $TEST test"
+echo Compiling $TEST test: > $OUTPUT.log
+echo ${COMPILE} >> $OUTPUT.log
+
+if ${COMPILE} >> ${OUTPUT}.log 2>&1; then
+ echo " [Success]"
+ echo "[Success]" >> $OUTPUT.log
+
+ echo -n "* Running $TEST test"
+ echo Running $TEST test: >> $OUTPUT.log
+ if ./$OUTPUT >> $OUTPUT.log 2>&1; then
+ echo " [Success]"
+ echo "[Success]" >> $OUTPUT.log
+ else
+ echo " [Failure]"
+ echo "[Failure]" >> $OUTPUT.log
+ fi
+else
+ echo " [Failure]"
+ echo "[Failure]" >> $OUTPUT.log
+fi
+
+echo \ No newline at end of file