switch to dune
[sqlgg.git] / run_test
blobb346b9d8617afb71732785a0034b0a7f434a421f
1 #! /bin/sh
3 set -e -u
5 OUTDIR=test/out
6 echo Running regression tests
8 mkdir -p test/out
9 for file in test/*.sql; do
10 basename=${file#test/}
11 ./_build/default/src/cli.exe -no-header -params named -gen xml "$file" > "$OUTDIR/${basename%.sql}.xml" || { echo "FAILED $file"; exit 2; }
12 done
14 if ! git rev-parse --git-dir > /dev/null ; then
15 echo SKIPPED
16 elif git diff --no-ext-diff --quiet --exit-code "$OUTDIR" ; then
17 echo OK
18 else
19 echo FAILED
20 git status -uno -s "$OUTDIR"
21 exit 2