Windows WML tests: Improve stdout output
Differentiate between timeouts and real errors: In case of a timeout, only throw a warning instead of an error. Also implement a basic progress bar.
This commit is contained in:
parent
8d91cef488
commit
f90569ccee
1 changed files with 12 additions and 1 deletions
|
@ -9,6 +9,7 @@ set binary=wesnoth.exe
|
|||
set opt=--log-strict=warning
|
||||
|
||||
cd ..\..\
|
||||
echo running WML tests:
|
||||
|
||||
:: ignore lines beginning with #
|
||||
:: %%G contains whether the test should pass (0), timeout (2) or fail (1,4)
|
||||
|
@ -17,9 +18,19 @@ for /f "eol=# tokens=1,2 delims= " %%G in (%LoadFile%) do (
|
|||
:: WindowsTimeout is more reliable than the --timeout option
|
||||
WindowsTimeout.exe "%binary% %opt% -u %%H" 20000
|
||||
if !ERRORLEVEL! neq %%G (
|
||||
echo WML_tests.cmd: Error WML1: Test '%%H' returned !ERRORLEVEL!, expected %%G
|
||||
if !ERRORLEVEL! equ 2 (
|
||||
echo(
|
||||
echo WML_tests.cmd: Warning WML2: Test '%%H' timed out, expected return value %%G
|
||||
) else (
|
||||
echo(
|
||||
echo WML_tests.cmd: Error WML1: Test '%%H' returned !ERRORLEVEL!, expected %%G
|
||||
)
|
||||
)
|
||||
:: minimalistic progress bar
|
||||
<nul (set/p progress=.)
|
||||
)
|
||||
echo(
|
||||
echo WML tests completed
|
||||
|
||||
:: restore the state before execution
|
||||
cd %~p0
|
||||
|
|
Loading…
Add table
Reference in a new issue