verserv.bat 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. if "%4"=="" goto Usage
  2. set PIGSDRIVE=c:
  3. set PIGSDIR=c:\pigs
  4. set PIGSTEMPLOG=%TEMP%\pigs.log
  5. if "%LOGDIR%"=="" set LOGDIR=%PIGSDIR%
  6. set PIGSLOG=%LOGDIR%\servbvt.log
  7. set PIGSERRLOG=%LOGDIR%\servbvt.err
  8. rem
  9. rem The first thing we need to do is copy pigs and its associated files.
  10. rem
  11. call %PROPDIR%\%1\test\setup.bat
  12. if exist %PIGSDIR%\error.log del %PIGSDIR%\error.log
  13. if exist %PIGSDIR%\event.log del %PIGSDIR%\event.log
  14. rem
  15. rem Make sure we have database accounts for pigs
  16. rem
  17. isql.exe -S %3 -E -d %4 -n -e -Q "exec CreatePigsMachine '%COMPUTERNAME%'"
  18. isql.exe -S %3 -E -d %4 -n -e -Q "exec CreatePigsMachine '%COMPUTERNAME%L'"
  19. rem
  20. rem Run pigs
  21. rem
  22. %PIGSDRIVE%
  23. cd %PIGSDIR%
  24. start pigs -Server %2
  25. sleep 30
  26. cd losers
  27. pigs -Server %2 -INIFile pigsl.ini
  28. cd ..
  29. rem
  30. rem Check the pigs log for success or failure.
  31. rem
  32. findstr Successfully event.log > %PIGSTEMPLOG%
  33. call %SCRIPTDIR%\util\filesize.bat %PIGSTEMPLOG% FILESIZE
  34. if not "%FILESIZE%"=="0" goto Success
  35. copy event.log %PIGSLOG%
  36. copy error.log %PIGSERRLOG%
  37. set BUILDERROR=1
  38. goto AfterCheck
  39. :Success
  40. echo No errors found. > %PIGSERRLOG%
  41. goto AfterCheck
  42. :AfterCheck
  43. set PIGSDRIVE=
  44. set PIGSDIR=
  45. set PIGSTEMPLOG=
  46. set PIGSERRLOG=
  47. set FILESIZE=
  48. goto End
  49. :Usage
  50. echo Usage: verserv [Build] [Allegiance Server] [SQL Server] [SQL Database]
  51. set BUILDERROR=1
  52. goto End
  53. :End