blob: dfa593808e05c0fcf0766b5a5b679555e4564316 [file] [log] [blame]
@rem Copyright (c) 2012 The Chromium Authors. All rights reserved.
@rem Use of this source code is governed by a BSD-style license that can be
@rem found in the LICENSE file.
@if "%ANALYZE_REPO%" == "" goto skipCD
@rem If ANALYZE_REPO is set then the results are put in that directory
cd /d "%ANALYZE_REPO%"
@rem Delete previous data
del set_analyze_revision.bat
@rem Retrieve the latest warnings
python -0
@if not exist set_analyze_revision.bat goto failure
call set_analyze_revision.bat
@set fullWarnings=analyze%ANALYZE_BUILD_NUMBER%_full.txt
@set summaryWarnings=analyze%ANALYZE_BUILD_NUMBER%_summary.txt
python %fullWarnings%
@set oldSummary=analyze%ANALYZE_PREV_BUILD_NUMBER%_summary.txt
@set oldFull=analyze%ANALYZE_PREV_BUILD_NUMBER%_full.txt
@if exist %oldSummary% goto doDiff
@if exist %oldFull% goto makeOldSummary
@echo No previous results. To get some earlier results for comparison
@goto skipDiff
python %oldFull%
@set newWarnings=analyze%ANALYZE_BUILD_NUMBER%_new.txt
python %oldSummary% %summaryWarnings% >%newWarnings%
start %newWarnings%
@if "%ANALYZE_REPO%" == "" goto notSet
if not exist "%ANALYZE_REPO%\src" goto notSet
cd src
@echo Retrieving source for the latest build results.
@rem Pull the latest code, go to the same revision that the builder used, and
@rem then do a gclient sync. echo has to be enabled after each call to git
@rem because it (erroneously) disables it.
call git fetch
@echo on
call git checkout %ANALYZE_REVISION%
@echo on
@rem Display where we are to make sure the git pull worked? Redirect to 'tee'
@rem to avoid invoking the pager.
call git log -1 | tee
@echo on
call gclient sync --jobs=16
@echo on
@exit /b
@echo If ANALYZE_REPO is set to point at a repo -- parent of src directory --
@echo then that repo will be synced to match the build machine.
@echo See set_analyze_revision.bat for parameters.
@exit /b
@echo Failed to retrieve results from the latest build
@exit /b