Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Unified Diff: tools/win/new_analyze_warnings/retrieve_latest_warnings.bat

Issue 1061663002: Adding batch file and scripts to get new /analyze warnings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set executable bit on retrieve_latest_warnings.bat. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/win/new_analyze_warnings/README ('k') | tools/win/new_analyze_warnings/retrieve_warnings.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/win/new_analyze_warnings/retrieve_latest_warnings.bat
diff --git a/tools/win/new_analyze_warnings/retrieve_latest_warnings.bat b/tools/win/new_analyze_warnings/retrieve_latest_warnings.bat
new file mode 100755
index 0000000000000000000000000000000000000000..dfa593808e05c0fcf0766b5a5b679555e4564316
--- /dev/null
+++ b/tools/win/new_analyze_warnings/retrieve_latest_warnings.bat
@@ -0,0 +1,71 @@
+@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.
+@setlocal
+
+@if "%ANALYZE_REPO%" == "" goto skipCD
+@rem If ANALYZE_REPO is set then the results are put in that directory
+cd /d "%ANALYZE_REPO%"
+:skipCD
+
+@rem Delete previous data
+del set_analyze_revision.bat
+@rem Retrieve the latest warnings
+python %~dp0retrieve_warnings.py -0
+@if not exist set_analyze_revision.bat goto failure
+
+@rem Set ANALYZE_REVISION and ANALYZE_BUILD_NUMBER
+call set_analyze_revision.bat
+
+@set fullWarnings=analyze%ANALYZE_BUILD_NUMBER%_full.txt
+@set summaryWarnings=analyze%ANALYZE_BUILD_NUMBER%_summary.txt
+
+python %~dp0warnings_by_type.py %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
+@echo use: %~dp0retrieve_warnings.py %ANALYZE_PREV_BUILD_NUMBER%
+@goto skipDiff
+:makeOldSummary
+python %~dp0warnings_by_type.py %oldFull%
+:doDiff
+@set newWarnings=analyze%ANALYZE_BUILD_NUMBER%_new.txt
+python %~dp0warning_diff.py %oldSummary% %summaryWarnings% >%newWarnings%
+start %newWarnings%
+:skipDiff
+
+@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
+
+:notSet
+@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
+
+:failure
+@echo Failed to retrieve results from the latest build
+@exit /b
« no previous file with comments | « tools/win/new_analyze_warnings/README ('k') | tools/win/new_analyze_warnings/retrieve_warnings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698