| 1 |
@echo off |
| 2 |
rem Test building a sample game. We'll make a copy of the sample |
| 3 |
rem game source and build the game. |
| 4 |
rem |
| 5 |
rem Usage: testsample <testName> |
| 6 |
rem |
| 7 |
|
| 8 |
rem ------ check for options: /Adv3 for an Adv3 sample test |
| 9 |
if %1 == /Adv3 goto setup_Adv3 |
| 10 |
|
| 11 |
rem ------ general sample - set source to %tstsamp% |
| 12 |
set tstsampsrc=%tstsamp% |
| 13 |
goto setup_Done |
| 14 |
|
| 15 |
rem ------ /Adv3 option - set source to Adv3 samples |
| 16 |
:setup_Adv3 |
| 17 |
shift |
| 18 |
set tstsampsrc=%tstlib%\adv3\samples |
| 19 |
|
| 20 |
:setup_Done |
| 21 |
|
| 22 |
echo Sample Game test: %1 |
| 23 |
|
| 24 |
rem Delete the log file if it already exists |
| 25 |
if exist %tstout%\%1.log del %tstout%\%1.log |
| 26 |
|
| 27 |
rem Copy the sample game to the output directory, renaming to testName.t |
| 28 |
copy %tstsampsrc%\%1.t %tstout%\%1.t >nul |
| 29 |
if errorlevel 1 echo Error in COPY %tstsampsrc%\%1.t %tstout%\%1.t >%tstout%\%1.log |
| 30 |
|
| 31 |
rem Compile testName.t with the adv3 library |
| 32 |
%tstbin%\capture >>%tstout%\%1.log %tstbin%\t3make -test -a -nobanner -DLANGUAGE=en_us -DMESSAGESTYLE=neu -nopre -Fo %tstout% -Fy %tstout% -o %tstout%\%1.t3 -lib system.tl -lib adv3/adv3.tl -source %tstout%\%1.t |
| 33 |
|
| 34 |
rem Run the test |
| 35 |
%tstbin%\capture >>%tstout%\%1.log %tstbin%\t3run -plain -norand -csl us-ascii -i %tstdat%\%1.in -l%tstout%\%1_run.log %tstout%\%1.t3 -norandomize |
| 36 |
|
| 37 |
rem Diff the outputs |
| 38 |
call %tstbat%\testdiff %1 |
| 39 |
call %tstbat%\testdiff %1_run |
| 40 |
|
| 41 |
echo. |