RunTests.bat 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. @echo off
  2. set _use_code_coverage=0
  3. for %%a in (%*) do if "%%a"=="-coverage" set _use_code_coverage=1
  4. set _release_build=0
  5. for %%a in (%*) do if "%%a"=="-release" set _release_build=1
  6. set _build_rx_tmp=%temp%\Rx
  7. rd /s /q "%_build_rx_tmp%"
  8. mkdir "%_build_rx_tmp%"
  9. set _runtest_list=Tests.System.Reactive.dll
  10. set _test_coverage_targets=System.Reactive.Core.dll System.Reactive.Linq.dll System.Reactive.PlatformServices.dll System.Reactive.Providers.dll
  11. if %_release_build%==1 (
  12. call msbuild /p:Configuration=Release45 /p:RunCodeAnalysis=false /p:OutputPath="%_build_rx_tmp%" Rx.sln
  13. ) else (
  14. call msbuild /p:Configuration=Debug45 /p:RunCodeAnalysis=false /p:OutputPath="%_build_rx_tmp%" Rx.sln
  15. )
  16. set _src_rx=%cd%
  17. pushd "%_build_rx_tmp%"
  18. set _original_path=%path%
  19. path %path%;c:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Performance Tools;
  20. if %_use_code_coverage%==1 (
  21. for %%a in (%_test_coverage_targets%) do call vsinstr -coverage %%a
  22. start vsperfmon -coverage -output:%cd%\runtests.coverage
  23. )
  24. call mstest /testcontainer:%_runtest_list%
  25. if %_use_code_coverage%==1 (
  26. vsperfcmd -shutdown
  27. copy %cd%\runtests.coverage "%_src_rx%\"
  28. )
  29. path %_original_path%
  30. popd