summaryrefslogtreecommitdiffstats
path: root/build/win
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-05 15:24:53 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-05 15:24:53 +0000
commitd8aa5400503c7c7976608b007e5488b95793b8c4 (patch)
treeb2435909c32f8f3dbbbefe106c704a05d3ab07ff /build/win
parent60114cc6a2ce3e8a5f910262aeac5d02dcdd5c30 (diff)
downloadchromium_src-d8aa5400503c7c7976608b007e5488b95793b8c4.zip
chromium_src-d8aa5400503c7c7976608b007e5488b95793b8c4.tar.gz
chromium_src-d8aa5400503c7c7976608b007e5488b95793b8c4.tar.bz2
Re-enable the grit hook, and make it more solid in case of failures.
I was unable to reproduce the failures from the bots on my machine. If they appear again, the build will not break, ane we will get full info. TEST=none http://crbug.com/17706 Review URL: http://codereview.chromium.org/159866 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22480 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/win')
-rw-r--r--build/win/clobber_generated_headers.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/build/win/clobber_generated_headers.py b/build/win/clobber_generated_headers.py
index cfcf83b..ff5c34a 100644
--- a/build/win/clobber_generated_headers.py
+++ b/build/win/clobber_generated_headers.py
@@ -12,6 +12,7 @@ import sys
_SRC_PATH = os.path.join(os.path.dirname(__file__), '..', '..')
sys.path.append(os.path.join(_SRC_PATH, 'tools', 'grit'))
+import grit.exception
import grit.grd_reader
# We need to apply the workaround only on Windows.
@@ -31,7 +32,16 @@ def total_split(path):
for path in sys.argv[1:]:
path = os.path.join('src', path)
path_components = total_split(path)
- root = grit.grd_reader.Parse(path)
+ try:
+ root = grit.grd_reader.Parse(path)
+ except grit.exception.Base, exc:
+ # This hook exploded badly a few times on the buildbot with exception
+ # at this point. Do not exit with an error, just print more information
+ # for debugging.
+ # TODO(phajdan.jr): Make exception fatal when the root cause is fixed.
+ print 'Unexpected GRIT exception while processing ' + path
+ print exc
+ continue
output_files = [node.GetOutputFilename() for node in root.GetOutputFiles()]
output_headers = [file for file in output_files if file.endswith('.h')]
for build_type in ('Debug', 'Release'):