-
Notifications
You must be signed in to change notification settings - Fork 644
/
RunEverything.cmd
73 lines (57 loc) · 2.6 KB
/
RunEverything.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
64
65
66
67
68
69
70
71
72
73
@echo Off
REM Working directory one level up
cd ..
set exitCode=0
REM Configuration
set config=Release
set solutionPath="NuGetGallery.FunctionalTests.sln"
REM Required Tools
set msbuild="%PROGRAMFILES(X86)%\MsBuild\14.0\Bin\msbuild"
set xunit="..\packages\xunit.runner.console.2.1.0\tools\xunit.console.exe"
set nuget="nuget.exe"
set mstest="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\mstest.exe"
REM Clean previous test results
if exist functionaltests.*.xml (
del functionaltests.*.xml
)
if exist resultsfile.*.trx (
del resultsfile.*.trx
)
if exist TestResults (
rd TestResults /S /Q
)
REM Restore packages
if not exist nuget (
call PowerShell -NoProfile -ExecutionPolicy Bypass -File %cd%\Scripts\DownloadLatestNuGetExeRelease.ps1
)
call %nuget% restore "%solutionPath%" -NonInteractive
if not "%errorlevel%"=="0" goto failure
REM Build the solution
call %msbuild% "%solutionPath%" /p:Configuration="%config%" /p:Platform="Any CPU" /p:CodeAnalysis=true /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diagnostic /nr:false
if not "%errorlevel%"=="0" goto failure
REM Run functional tests
set testDir="NuGetGallery.FunctionalTests\bin\%config%"
set fluentTestDir="NuGetGallery.FunctionalTests.Fluent\bin\%config%"
copy %nuget% %testDir%
call %xunit% "%testDir%\NuGetGallery.FunctionalTests.dll" -xml functionaltests.everything.xml
if not "%errorlevel%"=="0" set exitCode=-1
copy %nuget% %fluentTestDir%
call %xunit% "%fluentTestDir%\NuGetGallery.FunctionalTests.Fluent.dll" -xml functionaltests.fluent.xml
if not "%errorlevel%"=="0" set exitCode=-1
REM Run web UI tests
call %mstest% /TestContainer:"NuGetGallery.WebUITests.P0\bin\%config%\NuGetGallery.WebUITests.P0.dll" /TestSettings:Local.testsettings /detail:stdout /resultsfile:resultsfile.web1.trx
if not "%errorlevel%"=="0" set exitCode=-1
REM Run web UI tests
call %mstest% /TestContainer:"NuGetGallery.WebUITests.P1\bin\%config%\NuGetGallery.WebUITests.P1.dll" /TestSettings:Local.testsettings /detail:stdout /resultsfile:resultsfile.web2.trx
if not "%errorlevel%"=="0" set exitCode=-1
REM Run web UI tests
call %mstest% /TestContainer:"NuGetGallery.WebUITests.P2\bin\%config%\NuGetGallery.WebUITests.P2.dll" /TestSettings:Local.testsettings /detail:stdout /resultsfile:resultsfile.web3.trx
if not "%errorlevel%"=="0" set exitCode=-1
REM Run Load tests
call %mstest% /TestContainer:"NuGetGallery.LoadTests\bin\%config%\NuGetGallery.LoadTests.dll" /TestSettings:Local.testsettings /detail:stdout /category:%testCategory% /resultsfile:resultsfile.load.trx
if not "%errorlevel%"=="0" set exitCode=-1
goto end
:failure
set exitCode=-1
:end
exit /B %exitCode%