aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-07-10 14:40:13 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-07-10 14:40:13 +0200
commit19167cb869f9cc9be733a5ba7f45f10515930297 (patch)
tree8f67a20e8a8f06042204d0de3f96eaf6b2d25a1c
parent05faaf887421132a5811a82ee5cc9caa0832a981 (diff)
Add support for multiple database schema files
Files are executed in alphabetic order.
-rwxr-xr-xtester16
-rw-r--r--tester.bat3
2 files changed, 11 insertions, 8 deletions
diff --git a/tester b/tester
index c8f16fa..d0e91df 100755
--- a/tester
+++ b/tester
@@ -9,15 +9,17 @@
# The data files, if any, are in $srcdir.
#
-schema=`echo *.sql`
-
-if test -f $schema; then
- $top_builddir/db-driver $schema
+# Globbing returns files in alphabetic order.
+#
+for f in `echo *.sql`; do
+ if test -f $f; then
+ $top_builddir/db-driver $f
- if test $? -ne 0; then
- exit 1
+ if test $? -ne 0; then
+ exit 1
+ fi
fi
-fi
+done
echo ./driver --options-file "$top_builddir/db.options"
./driver --options-file "$top_builddir/db.options"
diff --git a/tester.bat b/tester.bat
index 98b0c4e..7c3c438 100644
--- a/tester.bat
+++ b/tester.bat
@@ -20,6 +20,8 @@ if "_%3_" == "_Win32_" (
set "dir=%3\%2"
)
+rem Globbing returns files in alphabetic order.
+rem
if exist *.sql (
for %%f in (*.sql) do (
call %topdir%\%1-driver.bat %%f
@@ -38,4 +40,3 @@ exit /b 1
:end
endlocal
-