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

Unified Diff: build/get_landmines.py

Issue 22935010: Refactor landmines.py so that it can be used downstream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use sys.executable to invoke the landmines scripts. Created 7 years, 4 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 | « no previous file | build/landmine_utils.py » ('j') | build/landmines.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/get_landmines.py
diff --git a/build/get_landmines.py b/build/get_landmines.py
new file mode 100755
index 0000000000000000000000000000000000000000..53fea0f002b13d9d234df76dc43c79acbb094cba
--- /dev/null
+++ b/build/get_landmines.py
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""
+This file emits the list of reasons why a particular build needs to be clobbered
+(or a list of 'landmines').
+"""
+
+import optparse
+import sys
+
+import landmine_utils
+
+
+builder = landmine_utils.platform
+distributor = landmine_utils.distributor
+gyp_defines = landmine_utils.gyp_defines
+gyp_msvs_version = landmine_utils.gyp_msvs_version
+platform = landmine_utils.platform
+
+
+def print_landmines(target):
+ """
+ ALL LANDMINES ARE EMITTED FROM HERE.
+ target can be one of {'Release', 'Debug', 'Debug_x64', 'Release_x64'}.
+ """
+ if (distributor() == 'goma' and platform() == 'win32' and
+ builder() == 'ninja'):
+ print 'Need to clobber winja goma due to backend cwd cache fix.'
+ if platform() == 'android':
+ print 'Clobber: Resources removed in r195014 require clobber.'
+ if platform() == 'win' and builder() == 'ninja':
+ print 'Compile on cc_unittests fails due to symbols removed in r185063.'
+ if platform() == 'linux' and builder() == 'ninja':
+ print 'Builders switching from make to ninja will clobber on this.'
+ if platform() == 'mac':
+ print 'Switching from bundle to unbundled dylib (issue 14743002).'
+ if (platform() == 'win' and builder() == 'ninja' and
+ gyp_msvs_version() == '2012' and
+ gyp_defines().get('target_arch') == 'x64' and
+ gyp_defines().get('dcheck_always_on') == '1'):
+ print "Switched win x64 trybots from VS2010 to VS2012."
+ print 'Need to clobber everything due to an IDL change in r154579 (blink)'
+
+
+def main():
+ parser = optparse.OptionParser()
+ parser.add_option('-t', '--target',
+ help=='Target for which the landmines have to be emitted')
+
+ options, args = parser.parse_args()
+
+ if args:
+ parser.error('Unknown arguments %s' % args)
+
+ print_landmines(options.target)
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main())
« no previous file with comments | « no previous file | build/landmine_utils.py » ('j') | build/landmines.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698