1@ECHO OFF 2 3rem Release or debug build. 4set DBG=0 5if "%1%" == "/d" set DBG=1 6 7rem Build libmpdec tests. 8cd ..\tests 9copy /y Makefile.vc Makefile 10nmake clean 11nmake DEBUG=%DBG% 12 13rem # Download the official test cases (text files). 14call gettests.bat 15 16echo. 17echo # ======================================================================== 18echo # libmpdec: static library 19echo # ======================================================================== 20echo. 21 22echo. 23<nul (set /p x="Running official tests ... ") 24echo. 25echo. 26runtest.exe official.decTest 27if %errorlevel% neq 0 goto out 28 29echo. 30<nul (set /p x="Running additional tests ... ") 31echo. 32echo. 33runtest.exe additional.decTest 34if %errorlevel% neq 0 goto out 35 36echo. 37echo # ======================================================================== 38echo # libmpdec: shared library 39echo # ======================================================================== 40echo. 41 42echo. 43<nul (set /p x="Running official tests ... ") 44echo. 45echo. 46runtest_shared.exe official.decTest 47if %errorlevel% neq 0 goto out 48 49echo. 50<nul (set /p x="Running additional tests ... ") 51echo. 52echo. 53runtest_shared.exe additional.decTest 54if %errorlevel% neq 0 goto out 55 56 57rem Build libmpdec++ tests. 58cd ..\tests++ 59copy /y Makefile.vc Makefile 60nmake clean 61nmake DEBUG=%DBG% 62 63rem # Copy or download the official test cases (text files). 64call gettests.bat 65 66echo. 67echo # ======================================================================== 68echo # libmpdec++: static library 69echo # ======================================================================== 70echo. 71 72echo. 73<nul (set /p x="Running official tests ... ") 74echo. 75echo. 76runtest.exe official.topTest --thread 77if %errorlevel% neq 0 goto out 78 79echo. 80<nul (set /p x="Running additional tests ... ") 81echo. 82echo. 83runtest.exe additional.topTest --thread 84if %errorlevel% neq 0 goto out 85 86echo. 87<nul (set /p x="Running API tests (single thread) ... ") 88echo. 89echo. 90apitest.exe 91if %errorlevel% neq 0 goto out 92 93echo. 94<nul (set /p x="Running API tests (threaded) ... ") 95echo. 96echo. 97apitest.exe --thread 98if %errorlevel% neq 0 goto out 99 100echo. 101echo # ======================================================================== 102echo # libmpdec++: shared library 103echo # ======================================================================== 104echo. 105 106echo. 107<nul (set /p x="Running official tests ... ") 108echo. 109echo. 110runtest_shared.exe official.topTest --thread 111if %errorlevel% neq 0 goto out 112 113echo. 114<nul (set /p x="Running additional tests ... ") 115echo. 116echo. 117runtest_shared.exe additional.topTest --thread 118if %errorlevel% neq 0 goto out 119 120echo. 121<nul (set /p x="Running API tests (single thread) ... ") 122echo. 123echo. 124apitest_shared.exe 125if %errorlevel% neq 0 goto out 126 127echo. 128<nul (set /p x="Running API tests (threaded) ... ") 129echo. 130echo. 131apitest_shared.exe --thread 132if %errorlevel% neq 0 goto out 133 134 135:out 136set exitcode=%errorlevel% 137cd ..\vcbuild 138exit /b %exitcode% 139