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

Unified Diff: tools/cr/cr/commands/run.py

Issue 142933004: [cr tool] Make context implicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 9 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/cr/cr/commands/prepare.py ('k') | tools/cr/cr/commands/select.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/cr/cr/commands/run.py
diff --git a/tools/cr/cr/commands/run.py b/tools/cr/cr/commands/run.py
index 9b57d9439c3c6107edf6b7ff71a5e6b8a225d6d4..cbfc421659b1f5bc052bcbf1bb5fd2083df9e6f2 100644
--- a/tools/cr/cr/commands/run.py
+++ b/tools/cr/cr/commands/run.py
@@ -29,22 +29,22 @@ class RunCommand(cr.Command):
self.ConsumeArgs(parser, 'the binary')
return parser
- def Run(self, context):
- targets = cr.Target.GetTargets(context)
+ def Run(self):
+ targets = cr.Target.GetTargets()
test_targets = [target for target in targets if target.is_test]
run_targets = [target for target in targets if not target.is_test]
- if cr.Installer.Skipping(context):
+ if cr.Installer.Skipping():
# No installer, only build test targets
build_targets = test_targets
else:
build_targets = targets
if build_targets:
- cr.Builder.Build(context, build_targets, [])
+ cr.Builder.Build(build_targets, [])
# See if we can use restart when not installing
- if cr.Installer.Skipping(context):
- cr.Runner.Restart(context, targets, context.remains)
+ if cr.Installer.Skipping():
+ cr.Runner.Restart(targets, cr.context.remains)
else:
- cr.Runner.Kill(context, run_targets, [])
- cr.Installer.Reinstall(context, run_targets, [])
- cr.Runner.Invoke(context, targets, context.remains)
+ cr.Runner.Kill(run_targets, [])
+ cr.Installer.Reinstall(run_targets, [])
+ cr.Runner.Invoke(targets, cr.context.remains)
« no previous file with comments | « tools/cr/cr/commands/prepare.py ('k') | tools/cr/cr/commands/select.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698