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

Unified Diff: scripts/tools/run_recipe.py

Issue 1183563003: Re-land "Modify annotated_run to read factory configs from the slave checkout." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: fix sys.path in dump_master_cfg, improve logging Created 5 years, 6 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 | « scripts/tools/dump_master_cfg.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/tools/run_recipe.py
diff --git a/scripts/tools/run_recipe.py b/scripts/tools/run_recipe.py
index c702cd199c23ec5652fb103113bad5010d9c9286..f85373d972487704ed2ae828af5fc4c41f3150cc 100755
--- a/scripts/tools/run_recipe.py
+++ b/scripts/tools/run_recipe.py
@@ -75,6 +75,7 @@ def parse_args(args):
parser = argparse.ArgumentParser(usage=USAGE)
parser.add_argument('recipe')
parser.add_argument('--properties-file')
+ parser.add_argument('--master-overrides-slave', action='store_true')
known_args, extra_args = parser.parse_known_args(args)
if known_args.properties_file:
@@ -89,7 +90,7 @@ def parse_args(args):
assert type(properties) is dict
properties['recipe'] = known_args.recipe
- return properties
+ return properties, known_args.master_overrides_slave
def get_properties_from_args(args):
@@ -109,7 +110,7 @@ def get_properties_from_file(filename):
def main(args):
"""Gets the recipe name and properties and runs an annotated run."""
- properties = parse_args(args)
+ properties, master_overrides_slave = parse_args(args)
properties.setdefault('use_mirror', False)
if not os.path.exists(SLAVE_DIR):
@@ -125,13 +126,15 @@ def main(args):
env['PYTHONUNBUFFERED'] = '1'
env['PYTHONIOENCODING'] = 'UTF-8'
- return subprocess.call(
- ['python', '-u', RUNIT, 'python', '-u', ANNOTATED_RUN,
- '--keep-stdin', # so that pdb works for local execution
- '--factory-properties', json.dumps(properties),
- '--build-properties', json.dumps(properties)],
- cwd=SLAVE_DIR,
- env=env)
+ cmd = ['python', '-u', RUNIT, 'python', '-u', ANNOTATED_RUN,
+ '--keep-stdin', # so that pdb works for local execution
+ '--factory-properties', json.dumps(properties),
+ '--build-properties', json.dumps(properties)]
+
+ if master_overrides_slave:
+ cmd.append('--master-overrides-slave')
+
+ return subprocess.call(cmd, cwd=SLAVE_DIR, env=env)
if __name__ == '__main__':
« no previous file with comments | « scripts/tools/dump_master_cfg.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698