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: cli/job_unittest.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 | « cli/job.py ('k') | client/bin/autotest » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cli/job_unittest.py
diff --git a/cli/job_unittest.py b/cli/job_unittest.py
index d0240e51b1dd6ba83149f72eb77182b1467c475b..06d9df1af79c6e87b7045ba4a3a74d63a90313af 100755
--- a/cli/job_unittest.py
+++ b/cli/job_unittest.py
@@ -831,6 +831,19 @@ class job_create_unittest(cli_mock.cli_unittest):
file_temp.clean()
+ def test_execute_create_job_with_control_and_comma_dependencies(self):
+ data = self.data.copy()
+ data['dependencies'] = ['dep2,False', 'dep1,True']
+ file_temp = cli_mock.create_file(self.ctrl_file)
+ self.run_cmd(argv=['atest', 'job', 'create', '-f', file_temp.name,
+ 'test_job0', '-m', 'host0', '-d',
+ 'dep1\,True, dep2\,False ', '--ignore_site_file'],
+ rpcs=[('create_job', data, True, 42)],
+ out_words_ok=['test_job0', 'Created'],
+ out_words_no=['Uploading', 'Done'])
+ file_temp.clean()
+
+
def test_execute_create_job_with_synch_count(self):
data = self.data.copy()
data['synch_count'] = 2
@@ -862,6 +875,24 @@ class job_create_unittest(cli_mock.cli_unittest):
out_words_no=['Uploading', 'Done'])
+ def test_execute_create_job_with_test_and_comma_dependencies(self):
+ data = self.data.copy()
+ data['dependencies'] = ['dep1,True', 'dep2,False', 'dep3,123']
+ self.run_cmd(argv=['atest', 'job', 'create', '-t', 'sleeptest',
+ 'test_job0', '-m', 'host0', '-d',
+ 'dep1\,True dep2\,False ', '--ignore_site_file'],
+ rpcs=[('generate_control_file',
+ {'tests': ['sleeptest']},
+ True,
+ {'control_file' : self.ctrl_file,
+ 'synch_count' : 1,
+ 'is_server' : False,
+ 'dependencies' : ['dep3,123']}),
+ ('create_job', data, True, 42)],
+ out_words_ok=['test_job0', 'Created'],
+ out_words_no=['Uploading', 'Done'])
+
+
def test_execute_create_job_with_kernel(self):
data = self.data.copy()
data['control_file'] = self.kernel_ctrl_file
« no previous file with comments | « cli/job.py ('k') | client/bin/autotest » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698