blob: e8155226dbb3375679c9b4f52f37c6bf90905fab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
@echo off
rem file : evolution/tester.bat
rem copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
rem license : GNU GPL v2; see accompanying LICENSE file
rem
rem Run an evolution test. The test directory is the current directory.
rem
rem %1 database
rem %2 configuration, for example, Debug or Release
rem %3 platform, for example Win32 or x64
rem topdir variable containing the path to top project directory
rem
setlocal
set "PATH=%topdir%\libcommon\bin64;%topdir%\libcommon\bin;%PATH%"
if "_%3_" == "_Win32_" (
set "dir=%2"
) else (
set "dir=%3\%2"
)
if exist test*.sql (
rem Standalone schema.
rem
rem Drop everything.
rem
call %topdir%\%1-driver.bat test3.sql
if errorlevel 1 goto error
call %topdir%\%1-driver.bat test2.sql
if errorlevel 1 goto error
call %topdir%\%1-driver.bat test1.sql
if errorlevel 1 goto error
rem Base schema.
rem
call %topdir%\%1-driver.bat test3-002-pre.sql
if errorlevel 1 goto error
call %topdir%\%1-driver.bat test3-002-post.sql
if errorlevel 1 goto error
%dir%\driver.exe --options-file %topdir%\%1.options 1
if errorlevel 1 goto error
rem Migration.
rem
call %topdir%\%1-driver.bat test3-003-pre.sql
if errorlevel 1 goto error
%dir%\driver.exe --options-file %topdir%\%1.options 2
if errorlevel 1 goto error
call %topdir%\%1-driver.bat test3-003-post.sql
if errorlevel 1 goto error
rem Current schema.
rem
%dir%\driver.exe --options-file %topdir%\%1.options 3
if errorlevel 1 goto error
) else (
rem Embedded schema. Just run the driver.
rem
%dir%\driver.exe --options-file %topdir%\%1.options 1
if errorlevel 1 goto error
%dir%\driver.exe --options-file %topdir%\%1.options 2
if errorlevel 1 goto error
%dir%\driver.exe --options-file %topdir%\%1.options 3
if errorlevel 1 goto error
)
goto end
:error
endlocal
exit /b 1
:end
endlocal
|