File tree 1 file changed +16
-1
lines changed
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,23 @@ echo create user %PDO_FIREBIRD_TEST_USER% password '%PDO_FIREBIRD_TEST_PASS%';>
65
65
echo commit;>> C:\Firebird\setup.sql
66
66
echo create database '%PDO_FIREBIRD_TEST_DATABASE% ' user '%PDO_FIREBIRD_TEST_USER% ' password '%PDO_FIREBIRD_TEST_PASS% ';>> C:\Firebird\setup.sql
67
67
C:\Firebird\instsvc.exe install -n TestInstance
68
- C:\Firebird\isql -q -i C:\Firebird\setup.sql
69
68
C:\Firebird\instsvc.exe start -n TestInstance
69
+ rem wait for Firebird to start
70
+ set WAIT_COUNT = 0
71
+ :waitloop
72
+ for /f " tokens=3" %%s in ('sc query TestInstance ^ | findstr STATE') do (
73
+ if " %%s " == " RUNNING" goto :isqlstart
74
+ )
75
+ set /a WAIT_COUNT += 1
76
+ if !WAIT_COUNT! geq !MAX_WAIT! (
77
+ echo Firebird service did not start within 20 seconds.
78
+ exit /b 3
79
+ )
80
+ ping -n 2 127.0.0.1 > nul
81
+ goto :waitloop
82
+ rem setup Firebird
83
+ :isqlstart
84
+ C:\Firebird\isql -q -i C:\Firebird\setup.sql
70
85
if %errorlevel% neq 0 exit /b 3
71
86
path C:\Firebird;%PATH%
72
87
You can’t perform that action at this time.
0 commit comments