Tune the Remakefile to re-run tests when the binary changes.
[tatoo.git] / Remakefile.in
index 355b643..1958a02 100644 (file)
@@ -148,7 +148,7 @@ distclean: clean
 
 ## Tests
 
-test_suite: tools src/@PACKAGE_TARNAME@.native@EXE@ 
+test_suite:
        for i in tests/*.xml
        do
                @REMAKE@ "$i".summary
@@ -157,7 +157,8 @@ test_suite: tools src/@PACKAGE_TARNAME@.native@EXE@
 
 %.summary:
                base="${1%.xml.summary}"
-               @REMAKE@ "$base".xml "$base".xml.queries
+               @REMAKE@ "$base".xml "$base".xml.queries tools src/@PACKAGE_TARNAME@.native@EXE@ 
+               rm -f "$1"
                cat "$base".xml.queries | grep -v '^#' | while read q query; do
                        echo -n "$base"".xml $q $query ... "
                        REF="$base".xml.results/"$q"_jaxp.xml
@@ -166,7 +167,7 @@ test_suite: tools src/@PACKAGE_TARNAME@.native@EXE@
                        LOG="$base".xml.results/"$q"_@PACKAGE_TARNAME@.log
                        src/@PACKAGE_TARNAME@.native@EXE@ -s "$base".xml \
                                "$query" "$OUTPUT" > "$LOG" 2>&1
-                       echo "Query: $q : $query" > "$1"
+                       echo "Query: $q : $query" >> "$1"
                        cat  "$LOG" | grep '^STATS' >> "$1"
                        echo -n "Diff: " >> "$1"
                        tools/xml_diff.native "$REF" "$OUTPUT" >/dev/null 2>&1