File tree Expand file tree Collapse file tree 7 files changed +29
-94
lines changed
Expand file tree Collapse file tree 7 files changed +29
-94
lines changed Original file line number Diff line number Diff line change 1717.PHONY : clean
1818clean :
1919 rm -f * _stderr.out
20- rm -f * _actual.txt
20+ rm -f 1.out
21+ rm -f stdout.actual
2122 rm -f * startup.log
2223 rm -f * _tmp.txt
Original file line number Diff line number Diff line change 11Run a set of shmig commands against each backend.
22
3+ Starts up MySQL and PostgreSql databases in a Docker container.
4+
35Requires:
46
5- 1. mysql client installed and on PATH
7+ 1. sqlite3 is installed
8+
9+ 2. mysql client installed and on PATH
610
7- 2 . psql client installed and on PATH
11+ 3 . psql client installed and on PATH
812
9- 3. docker running
13+ 4. Docker running
1014
1115Sample output:
1216
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11#! /bin/sh
22# Run shmig tests against a database server.
33
4- source report.sh
54
65[ " x$1 " = " x" ] && printf " usage: %s <testsuite>\n" $( basename $0 ) >&2 && exit 1
76
@@ -117,10 +116,9 @@ esac
117116#
118117# -----------------------------------------------------------------------------
119118
120- report_start $DB
121-
122- F=$( report_filename $DB )
119+ printf " %-10s .......... " $DB
123120
121+ F=1.out
124122rm -f $F
125123rm -f * _stderr.out
126124
@@ -160,5 +158,22 @@ case $DB in
160158esac
161159
162160
161+ #
162+ # Replace time stamps with the string "*now*" and change tabs to '|'
163+ # in MySQL output.
164+ #
165+
166+ sed ' s/20..-[012].-[0123]. ..:..:..\(\.[0-9]*\)*/*now*/' $F | sed ' s/ /|/g' > stdout.actual
167+
168+
169+ #
170+ # Use diff to get test result.
171+ #
163172
164- report_result $DB
173+ if diff -uw stdout.expected stdout.actual > /dev/null
174+ then
175+ printf " PASS\n" $1
176+ else
177+ printf " FAIL (diff below)\n" $1
178+ diff -uw stdout.expected stdout.actual
179+ fi
Load Diff This file was deleted.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments