| Index: trunk/src/build/landmines.py
|
| ===================================================================
|
| --- trunk/src/build/landmines.py (revision 220869)
|
| +++ trunk/src/build/landmines.py (working copy)
|
| @@ -83,13 +83,15 @@
|
| os.remove(triggered)
|
|
|
|
|
| -def main():
|
| +def process_options():
|
| + """Returns a list of landmine emitting scripts."""
|
| parser = optparse.OptionParser()
|
| parser.add_option(
|
| '-s', '--landmine-scripts', action='append',
|
| default=[os.path.join(SRC_DIR, 'build', 'get_landmines.py')],
|
| help='Path to the script which emits landmines to stdout. The target '
|
| - 'is passed to this script via option -t.')
|
| + 'is passed to this script via option -t. Note that an extra '
|
| + 'script can be specified via an env var EXTRA_LANDMINES_SCRIPT.')
|
| parser.add_option('-v', '--verbose', action='store_true',
|
| default=('LANDMINES_VERBOSE' in os.environ),
|
| help=('Emit some extra debugging information (default off). This option '
|
| @@ -104,11 +106,20 @@
|
| logging.basicConfig(
|
| level=logging.DEBUG if options.verbose else logging.ERROR)
|
|
|
| + extra_script = os.environ.get('EXTRA_LANDMINES_SCRIPT')
|
| + if extra_script:
|
| + return options.landmine_scripts + [extra_script]
|
| + else:
|
| + return options.landmine_scripts
|
| +
|
| +
|
| +def main():
|
| + landmine_scripts = process_options()
|
| gyp_helper.apply_chromium_gyp_env()
|
|
|
| for target in ('Debug', 'Release', 'Debug_x64', 'Release_x64'):
|
| landmines = []
|
| - for s in options.landmine_scripts:
|
| + for s in landmine_scripts:
|
| proc = subprocess.Popen([sys.executable, s, '-t', target],
|
| stdout=subprocess.PIPE)
|
| output, _ = proc.communicate()
|
|
|