| 1 | @echo off |
| 2 | setlocal |
| 3 | rem A simplified .cmd port of regress.sh, using regress.awk. |
| 4 | rem |
| 5 | rem Usage: regress [gnugo.exe] |
| 6 | rem |
| 7 | rem Start in the gnugo/regress subdir, the same one where regress.awk |
| 8 | rem (and the original regress.sh) resides. You will need a working |
| 9 | rem awk.exe in your %PATH%. |
| 10 | rem |
| 11 | rem Use the command line to point to the gnugo.exe you want to test. |
| 12 | rem If built with VStudio sln/vcproj files, use one of: |
| 13 | rem ..\interface\{debug,release,minsizerel,relwithdebinfo}\gnugo.exe |
| 14 | rem If built with NMake/MSYS/MinGW makefiles, use: |
| 15 | rem ..\interface\gnugo.exe |
| 16 | |
| 17 | rem The 5 test batches, based on the main gnugo tests, regress/Makefile* |
| 18 | rem XXX Need to track the main regress/Makefile for changes to these lists! |
| 19 | set b1=reading owl ld_owl optics filllib atari_atari connection break_in blunder unconditional trevora nngs1 strategy |
| 20 | set b2=endgame heikki neurogo arb rosebud golife arion viking ego dniwog lazarus trevorb strategy2 |
| 21 | set b3=nicklas1 nicklas2 nicklas3 nicklas4 nicklas5 manyfaces niki trevor tactics buzco nngs trevorc strategy3 |
| 22 | set b4=capture connect global vie arend 13x13 semeai STS-RV_0 STS-RV_1 STS-RV_e STS-RV_Misc trevord strategy4 |
| 23 | set b5=owl1 handtalk nngs2 nngs3 nngs4 strategy5 century2002 auto01 auto02 auto03 auto04 auto_handtalk safety ninestones tactics1 manyfaces1 gunnar arend2 nando thrash 13x13b joseki gifu03 seki 9x9 cgf2004 kgs olympiad2004 tiny gifu05 13x13c |
| 24 | |
| 25 | rem Check for regress.awk, fail if not present. |
| 26 | if not exist regress.awk echo ERROR: cannot find regress.awk. aborting... |
| 27 | if not exist regress.awk goto done |
| 28 | |
| 29 | rem Optionally get gnugo.exe location from command line; fail if not found. |
| 30 | if "%1"=="" set gnugo=..\interface\gnugo.exe |
| 31 | if not "%1"=="" set gnugo=%1 |
| 32 | if not exist %gnugo% echo ERROR: cannot find gnugo.exe executable [%gnugo%]. aborting... |
| 33 | if not exist %gnugo% goto done |
| 34 | |
| 35 | rem Finally, do the actual testing. |
| 36 | for %%t in (%b1%) do %gnugo% --quiet --mode gtp < %%t.tst | awk -f regress.awk tst=%%t.tst |
| 37 | for %%t in (%b2%) do %gnugo% --quiet --mode gtp < %%t.tst | awk -f regress.awk tst=%%t.tst |
| 38 | for %%t in (%b3%) do %gnugo% --quiet --mode gtp < %%t.tst | awk -f regress.awk tst=%%t.tst |
| 39 | for %%t in (%b4%) do %gnugo% --quiet --mode gtp < %%t.tst | awk -f regress.awk tst=%%t.tst |
| 40 | for %%t in (%b5%) do %gnugo% --quiet --mode gtp < %%t.tst | awk -f regress.awk tst=%%t.tst |
| 41 | |
| 42 | :done |
| 43 | |