tests: fix on windows (appveyor)
[sqlgg.git] / run_test
blob58b95673dc96cf9316791c62a2d2953131ccbf1d
1 #! /bin/sh
3 set -e -u
5 mode=${1:-run}
7 if [ "$mode" = "init" ] ; then
8 OUTDIR=test/out
9 echo Initializing test outputs in $OUTDIR
10 else
11 OUTDIR=test/tmp
12 echo Running regression tests
15 mkdir -p test/out test/tmp
16 for file in test/*.sql; do
17 basename=${file#test/}
18 _build/src/cli.native -no-header -gen xml $file > $OUTDIR/${basename%.sql}.xml || { echo FAILED $file; exit 2; }
19 done
21 [ "$mode" = "init" ] || diff --strip-trailing-cr -u test/out test/tmp
23 echo OK