Fix canonizer test programs
This commit is contained in:
parent
1908faf150
commit
c6e0d1f33c
@ -48,6 +48,7 @@ int main(int argc, char** argv)
|
||||
|
||||
qc_setup("qc_sqlite", NULL);
|
||||
qc_process_init(QC_INIT_BOTH);
|
||||
qc_thread_init(QC_INIT_BOTH);
|
||||
|
||||
infile = fopen(argv[1], "rb");
|
||||
outfile = fopen(argv[2], "wb");
|
||||
|
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
if [[ $# -lt 4 ]]
|
||||
if [ $# -lt 4 ]
|
||||
then
|
||||
echo "Usage: canontest.sh <logfile name> <input file> <output file> <expected output>"
|
||||
exit 0
|
||||
@ -11,7 +11,7 @@ EXPECTED=$4
|
||||
DIFFLOG=diff.out
|
||||
|
||||
if [ $# -eq 5 ]
|
||||
then
|
||||
then
|
||||
EXECUTABLE=$5
|
||||
else
|
||||
EXECUTABLE=$PWD/canonizer
|
||||
@ -20,11 +20,11 @@ fi
|
||||
$EXECUTABLE $INPUT $OUTPUT
|
||||
diff $OUTPUT $EXPECTED > $DIFFLOG
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
then
|
||||
echo "PASSED" >> $TESTLOG
|
||||
exval=0
|
||||
else
|
||||
echo "FAILED" >> $TESTLOG
|
||||
echo "FAILED" >> $TESTLOG
|
||||
echo "Diff output: " >> $TESTLOG
|
||||
cat $DIFFLOG >> $TESTLOG
|
||||
exval=1
|
||||
|
Loading…
x
Reference in New Issue
Block a user