forked from dotnet/BenchmarkDotNet
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrunClassicTests.cmd
63 lines (51 loc) · 2.45 KB
/
runClassicTests.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@echo off
echo Starting Initial Cleanup
echo -----------------------------
if exist "testsOutput" rmdir /s /q "testsOutput"
echo -----------------------------
echo Initial Cleanup finished
echo -----------------------------
echo Starting Build
echo -----------------------------
set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% (
echo Error: Could not find MSBuild.exe.
exit /B
)
call %_msbuildexe% BenchmarkDotNet.sln /t:build /property:Configuration=Release
if NOT %ERRORLEVEL% == 0 (
echo Error: Build has failed
exit /B
)
echo -----------------------------
echo Build finished
echo -----------------------------
echo Starting Copying files
echo -----------------------------
mkdir testsOutput
call build/batchcopy.cmd "BenchmarkDotNet/bin/Release/net40/*.*" "testsOutput"
call build/batchcopy.cmd "BenchmarkDotNet.Diagnostics.Windows/bin/Release/net40/*.*" "testsOutput"
call build/batchcopy.cmd "BenchmarkDotNet.IntegrationTests/bin/Release/net451/*.*" "testsOutput"
call build/batchcopy.cmd "BenchmarkDotNet.Tests/bin/Release/net451/*.*" "testsOutput"
call build/batchcopy.cmd "BenchmarkDotNet.IntegrationTests.Classic/bin/Release/*.*" "testsOutput"
call build/batchcopy.cmd "%USERPROFILE%/.nuget/packages/Microsoft.Diagnostics.Tracing.TraceEvent/1.0.41/lib/net40" "testsOutput"
call build/batchcopy.cmd "%USERPROFILE%/.nuget/packages/xunit.runner.console/2.1.0/tools" "testsOutput"
call build/batchcopy.cmd "%USERPROFILE%/.nuget/packages/xunit.extensibility.execution/2.1.0/lib/net45" "testsOutput"
call build/batchcopy.cmd "%USERPROFILE%/.nuget/packages/xunit.extensibility.core/2.1.0/lib/portable-net45+win8+wp8+wpa81" "testsOutput"
call build/batchcopy.cmd "%USERPROFILE%/.nuget/packages/xunit.assert/2.1.0/lib/portable-net45+win8+wp8+wpa81" "testsOutput"
echo -----------------------------
echo Copying files ended
echo -----------------------------
echo Running Tests for Classic Desktop CLR
echo -----------------------------
call "testsOutput/xunit.console.exe" "testsOutput/BenchmarkDotNet.Tests.dll" "testsOutput/BenchmarkDotNet.IntegrationTests.dll" "testsOutput/BenchmarkDotNet.IntegrationTests.Classic.exe" 2> failedTests.txt
if NOT %ERRORLEVEL% == 0 (
type failedTests.txt
goto cleanup
)
echo -----------------------------
echo All classic tests has passed
echo -----------------------------
:cleanup
del failedTests.txt