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

Unified Diff: cli/job.py

Issue 6539001: Merge remote branch 'cros/upstream' into master. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 10 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 | cli/job_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cli/job.py
diff --git a/cli/job.py b/cli/job.py
index c90959163998cd2ab36fddb863a030e1c387cc00..091468bd04147f4868006d807bd48b1471ac0b4a 100644
--- a/cli/job.py
+++ b/cli/job.py
@@ -299,7 +299,7 @@ class job_create_or_clone(action_common.atest_create, job):
return (hosts, meta_hosts)
- def parse(self):
+ def parse(self, parse_info=[]):
host_info = topic_common.item_parse_info(attribute_name='hosts',
inline_option='machine',
filename_option='mlist')
@@ -310,9 +310,9 @@ class job_create_or_clone(action_common.atest_create, job):
label_info = topic_common.item_parse_info(attribute_name='labels',
inline_option='labels')
- options, leftover = super(job_create_or_clone,
- self).parse([host_info, job_info, oth_info,
- label_info], req_items='jobname')
+ options, leftover = super(job_create_or_clone, self).parse(
+ [host_info, job_info, oth_info, label_info] + parse_info,
+ req_items='jobname')
self.data = {}
if len(self.jobname) > 1:
self.invalid_syntax('Too many arguments specified, only expected '
@@ -445,7 +445,10 @@ class job_create(job_create_or_clone):
def parse(self):
- options, leftover = super(job_create, self).parse()
+ deps_info = topic_common.item_parse_info(attribute_name='dependencies',
+ inline_option='dependencies')
+ options, leftover = super(job_create, self).parse(
+ parse_info=[deps_info])
if (len(self.hosts) == 0 and not self.one_time_hosts
and not options.labels and not options.atomic_group):
@@ -506,9 +509,7 @@ class job_create(job_create_or_clone):
if options.atomic_group:
self.data['atomic_group_name'] = options.atomic_group
- deps = options.dependencies.split(',')
- deps = [dep.strip() for dep in deps if dep.strip()]
- self.data['dependencies'] = deps
+ self.data['dependencies'] = self.dependencies
if options.synch_count:
self.data['synch_count'] = options.synch_count
« no previous file with comments | « no previous file | cli/job_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698