| OLD | NEW |
| 1 @echo off | 1 @echo off |
| 2 setlocal |
| 2 | 3 |
| 3 :: Locations | 4 :: Locations |
| 4 set out_directory=..\..\out\vs_addin\Test | 5 set out_directory=..\..\out\vs_addin\Test |
| 5 set mstest_file=Results.trx | 6 set mstest_file=Results.trx |
| 6 set test_assembly=..\..\out\vs_addin\Debug\UnitTests.dll | 7 set test_assembly=..\..\out\vs_addin\2010\Debug\UnitTests.dll |
| 7 | 8 |
| 8 :: Set up the Visual Studio environment | 9 :: Set up the Visual Studio environment |
| 9 call "%VS100COMNTOOLS%vsvars32.bat" | 10 call "%VS100COMNTOOLS%vsvars32.bat" |
| 10 | 11 |
| 11 :: Make the output directory and clean up existing mstest result file | 12 :: Make the output directory and clean up existing mstest result file |
| 12 mkdir %out_directory% | 13 mkdir %out_directory% |
| 13 if exist %out_directory%\%mstest_file% del %out_directory%\%mstest_file% | 14 if exist %out_directory%\%mstest_file% del %out_directory%\%mstest_file% |
| 14 | 15 |
| 15 :: Run MSTest | 16 :: Run MSTest |
| 16 mstest /testcontainer:%test_assembly% /testsettings:Local.testsettings /resultsf
ile:%out_directory%\%mstest_file% | 17 mstest /testcontainer:%test_assembly% /testsettings:Local.testsettings /resultsf
ile:%out_directory%\%mstest_file% |
| 17 | 18 |
| 18 :: Parse the result with python script, return python's exit status | 19 :: Parse the result with python script, return python's exit status |
| 19 python check_test_results.py %out_directory%\%mstest_file% | 20 python check_test_results.py %out_directory%\%mstest_file% |
| 20 exit /B %ERRORLEVEL% | 21 |
| 22 endlocal & set BUILD_ERRORLEVEL=%ERRORLEVEL% |
| 23 |
| 24 :endbuild |
| 25 exit /B %BUILD_ERRORLEVEL% |
| OLD | NEW |