1 @rem Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 @rem Use of this source code is governed by a BSD-style license that can be
3 @rem found in the LICENSE file.
6 @if "%ANALYZE_REPO%" == "" goto skipCD
7 @rem If ANALYZE_REPO is set then the results are put in that directory
11 @rem Delete previous data
12 del set_analyze_revision.bat
13 @rem Retrieve the latest warnings
14 python %~dp0retrieve_warnings.py -0
15 @if not exist set_analyze_revision.bat goto failure
17 @rem Set ANALYZE_REVISION and ANALYZE_BUILD_NUMBER
18 call set_analyze_revision.bat
20 @set fullWarnings=analyze%ANALYZE_BUILD_NUMBER%_full.txt
21 @set summaryWarnings=analyze%ANALYZE_BUILD_NUMBER%_summary.txt
23 python %~dp0warnings_by_type.py %fullWarnings%
25 @set oldSummary=analyze%ANALYZE_PREV_BUILD_NUMBER%_summary.txt
26 @set oldFull=analyze%ANALYZE_PREV_BUILD_NUMBER%_full.txt
27 @if exist %oldSummary% goto doDiff
28 @if exist %oldFull% goto makeOldSummary
29 @echo No previous results. To get some earlier results for comparison
30 @echo use: %~dp0retrieve_warnings.py %ANALYZE_PREV_BUILD_NUMBER%
33 python %~dp0warnings_by_type.py %oldFull%
35 @set newWarnings=analyze%ANALYZE_BUILD_NUMBER%_new.txt
36 python %~dp0warning_diff.py %oldSummary% %summaryWarnings% >%newWarnings%
40 @if "%ANALYZE_REPO%" == "" goto notSet
41 if not exist "%ANALYZE_REPO%\src" goto notSet
45 @echo Retrieving source for the latest build results.
47 @rem Pull the latest code, go to the same revision that the builder used, and
48 @rem then do a gclient sync. echo has to be enabled after each call to git
49 @rem because it (erroneously) disables it.
52 call git checkout %ANALYZE_REVISION%
54 @rem Display where we are to make sure the git pull worked? Redirect to 'tee'
55 @rem to avoid invoking the pager.
58 call gclient sync --jobs=16
64 @echo If ANALYZE_REPO is set to point at a repo -- parent of src directory --
65 @echo then that repo will be synced to match the build machine.
66 @echo See set_analyze_revision.bat for parameters.
70 @echo Failed to retrieve results from the latest build