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