Fix the Remakefile and testing script.
[tatoo.git] / tools / gen_test_results.sh
1 #!/bin/sh
2
3 PROGS="$@"
4 for doc in tests/*.xml
5 do
6     if [ -f "$doc".queries ]
7     then
8         cat "$doc".queries | grep -v '^#' | while read qname q
9         do
10             D=""
11             N=""
12             echo "$qname" "$q"
13             for p in $PROGS
14             do
15                 echo "$p":
16                 cat "$doc".results/"$qname"_"$p".log | grep --color=never 'INFO\|time'
17                 N="$N_$p"
18                 D="$D $doc".results/"$qname"_"$p".xml
19             done
20
21             echo -n "Diff ... "
22             DIFFILE="$doc".results/"$qname"_"$N".diff
23             ./tools/xml_diff.native $D > "$DIFFILE" 2>&1
24             case "$?" in
25                 "0")
26                     echo "ok"
27                     rm -f "$DIFFILE"
28                     ;;
29                 *)
30                     echo "failed"
31                     ;;
32             esac
33             echo "-------------------------------------------"
34         done
35     fi
36
37
38 done