24 lines
1.0 KiB
Batchfile
24 lines
1.0 KiB
Batchfile
@echo off
|
|
setlocal
|
|
set "TTUI_TEST_CONFIG=%~1"
|
|
if "%TTUI_TEST_CONFIG%"=="" set "TTUI_TEST_CONFIG=Debug"
|
|
for /f "usebackq delims=" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe`) do set "TTUI_MSBUILD=%%i"
|
|
if not defined TTUI_MSBUILD (
|
|
echo MSBuild not found. Install Visual Studio 2022 C++ workload.
|
|
exit /b 1
|
|
)
|
|
"%TTUI_MSBUILD%" "%~dp0ui\ttui\tests\smoke.vcxproj" -p:Configuration=%TTUI_TEST_CONFIG% -p:Platform=x64 -v:minimal
|
|
if errorlevel 1 exit /b 1
|
|
"%TTUI_MSBUILD%" "%~dp0client\tests\http_transport_tests.vcxproj" -p:Configuration=%TTUI_TEST_CONFIG% -p:Platform=x64 -v:minimal
|
|
if errorlevel 1 exit /b 1
|
|
pushd "%~dp0"
|
|
"%~dp0ui\ttui\lib\x64\%TTUI_TEST_CONFIG%\smoke.exe"
|
|
if errorlevel 1 (
|
|
popd
|
|
exit /b 1
|
|
)
|
|
python "%~dp0client\tests\run_http_transport_tests.py" "%~dp0client\bin\tests\%TTUI_TEST_CONFIG%\http_transport_tests.exe"
|
|
set "TTUI_TEST_EXIT=%ERRORLEVEL%"
|
|
popd
|
|
endlocal & exit /b %TTUI_TEST_EXIT%
|