Skip to content

Commit

Permalink
Merge pull request #15120 from TyOverby/kill-build
Browse files Browse the repository at this point in the history
kill build processes before perf run ALSO fail build if we can't kill build processes
  • Loading branch information
TyOverby authored Nov 18, 2016
2 parents 5353525 + 7f24817 commit cca7c7c
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions cibuild.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ copy "build\bootstrap\*" "%bindir%\Bootstrap" || goto :BuildFailed
REM Clean the previous build
msbuild %MSBuildAdditionalCommandLineArgs% /t:Clean build/Toolset/Toolset.csproj /p:Configuration=%BuildConfiguration% /fileloggerparameters:LogFile="%bindir%\BootstrapClean.log" || goto :BuildFailed

call :TerminateBuildProcesses
call :TerminateBuildProcesses || goto :BuildFailed

if defined TestDeterminism (
powershell -noprofile -executionPolicy RemoteSigned -file "%RoslynRoot%\build\scripts\test-determinism.ps1" "%bindir%\Bootstrap" || goto :BuildFailed
call :TerminateBuildProcesses
call :TerminateBuildProcesses || goto :BuildFailed
exit /b 0
)

Expand Down Expand Up @@ -110,14 +110,16 @@ if defined TestPerfRun (
)
)

call :TerminateBuildProcesses || goto :BuildFailed

.\Binaries\%BuildConfiguration%\Exes\Perf.Runner\Roslyn.Test.Performance.Runner.exe --no-trace-upload !EXTRA_PERF_RUNNER_ARGS! || goto :BuildFailed
exit /b 0
)

msbuild %MSBuildAdditionalCommandLineArgs% /p:BootstrapBuildPath="%bindir%\Bootstrap" BuildAndTest.proj /p:Configuration=%BuildConfiguration% /p:Test64=%Test64% /p:TestVsi=%TestVsi% /p:RunProcessWatchdog=%RunProcessWatchdog% /p:BuildStartTime=%BuildStartTime% /p:"ProcDumpExe=%ProcDumpExe%" /p:BuildTimeLimit=%BuildTimeLimit% /p:PathMap="%RoslynRoot%=q:\roslyn" /p:Feature=pdb-path-determinism /fileloggerparameters:LogFile="%bindir%\Build.log";verbosity=diagnostic /p:DeployExtension=false || goto :BuildFailed
powershell -noprofile -executionPolicy RemoteSigned -file "%RoslynRoot%\build\scripts\check-msbuild.ps1" "%bindir%\Build.log" || goto :BuildFailed

call :TerminateBuildProcesses
call :TerminateBuildProcesses || goto :BuildFailed

REM Ensure caller sees successful exit.
exit /b 0
Expand All @@ -142,5 +144,12 @@ exit /b 1
@REM Kill any instances of msbuild.exe to ensure that we never reuse nodes (e.g. if a non-roslyn CI run
@REM left some floating around).

taskkill /F /IM vbcscompiler.exe 2> nul
taskkill /F /IM msbuild.exe 2> nul
@REM An error-level of 1 means that the process was found, but could not be killed.
echo Killing all build-related processes
taskkill /F /IM msbuild.exe > nul
if %ERRORLEVEL% == 1 exit /b 1

taskkill /F /IM vbcscompiler.exe > nul
if %ERRORLEVEL% == 1 exit /b 1

exit /b 0

0 comments on commit cca7c7c

Please sign in to comment.