blob: 5a9ac231345aaa52eae976a0a653a12b351fc636 [file] [log] [blame]
@echo off
setlocal
:: Locations
set out_directory=..\..\out\vs_addin\Test
set mstest_file=Results.trx
set test_assembly=..\..\out\vs_addin\2012\Debug\UnitTests.dll
:: Set up the Visual Studio environment
call "%VS110COMNTOOLS%vsvars32.bat"
:: Make the output directory and clean up existing mstest result file
mkdir %out_directory%
if exist %out_directory%\%mstest_file% del %out_directory%\%mstest_file%
:: Run MSTest
mstest /testcontainer:%test_assembly% /testsettings:Local.testsettings /resultsfile:%out_directory%\%mstest_file%
:: Parse the result with python script, return python's exit status
python check_test_results.py %out_directory%\%mstest_file%
endlocal & set BUILD_ERRORLEVEL=%ERRORLEVEL%
:endbuild
exit /B %BUILD_ERRORLEVEL%