+ ./run_test init
[sqlgg.git] / run_test
blob64622254970e48ae76ebcdf81f5026338977dccc
1 #! /bin/sh
3 set -e -u
5 if [ "$1" = "init" ] ; then
6 OUTDIR=test/out
7 echo Initializing test outputs in $OUTDIR
8 else
9 OUTDIR=test/tmp
10 echo Running regression tests
13 mkdir -p test/out test/tmp
14 for file in test/*.sql; do
15 basename=${file#test/}
16 ./cli.native -no-header -gen xml $file > $OUTDIR/${basename%.sql}.xml || { echo FAILED $file; exit 2; }
17 done
19 [ "$1" = "init" ] || diff -u test/out test/tmp
21 echo OK