aboutsummaryrefslogtreecommitdiff
path: root/tester.in
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-04-29 08:29:49 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-04-29 08:29:49 +0200
commit871082dc018815261b6ec75a8e4933505389ffae (patch)
tree6b92641afc8dbbf234fa5b46569ed4335cb4204b /tester.in
parenteb95d50569946def5e55c73445c1d85f603e8536 (diff)
Support for autotools and VC++ 9, 10, 11 build systems
Diffstat (limited to 'tester.in')
-rwxr-xr-xtester.in44
1 files changed, 44 insertions, 0 deletions
diff --git a/tester.in b/tester.in
new file mode 100755
index 0000000..13d396e
--- /dev/null
+++ b/tester.in
@@ -0,0 +1,44 @@
+#! /bin/sh
+
+# file : tester.in
+# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
+# license : MIT; see accompanying LICENSE file
+
+#
+# Run test or example. The test driver is in the current directory.
+# The data files, if any, are in $srcdir. If $example is set, then
+# we are testing an example and no output verification is required.
+#
+
+# Globbing returns files in alphabetic order.
+#
+files=`echo $srcdir/*.xml`
+
+if test "$files" != "$srcdir/*.xml"; then
+ for f in $files; do
+ echo ./driver $f
+
+ if test -n "$example"; then
+ ./driver $f
+ else
+ ./driver $f >test.out
+ fi
+
+ if test $? -ne 0; then
+ rm -f test.out
+ exit 1
+ fi
+
+ if test -z "$example"; then
+ @DIFF@ @DIFFFLAGS@ $f test.out
+ r=$?
+ rm -f test.out
+ if test $r -ne 0; then
+ exit 1
+ fi
+ fi
+ done
+else
+ echo ./driver
+ ./driver
+fi