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

Side by Side Diff: bin/cros_run_parallel_vm_tests.py

Issue 5555003: Update scripts to avoid using deprecated --test_case syntax. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « bin/cbuildbot.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Runs tests on VMs in parallel.""" 6 """Runs tests on VMs in parallel."""
7 7
8 import optparse 8 import optparse
9 import os 9 import os
10 import subprocess 10 import subprocess
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 entries: 63 entries:
64 'test': the test name; 64 'test': the test name;
65 'proc': the Popen process instance for this test run. 65 'proc': the Popen process instance for this test run.
66 """ 66 """
67 ssh_port = self._base_ssh_port 67 ssh_port = self._base_ssh_port
68 spawned_tests = [] 68 spawned_tests = []
69 for test in self._tests: 69 for test in self._tests:
70 args = [ os.path.join(os.path.dirname(__file__), 'cros_run_vm_test'), 70 args = [ os.path.join(os.path.dirname(__file__), 'cros_run_vm_test'),
71 '--snapshot', # The image is shared so don't modify it. 71 '--snapshot', # The image is shared so don't modify it.
72 '--no_graphics', 72 '--no_graphics',
73 '--ssh_port=%d' % ssh_port, 73 '--ssh_port=%d' % ssh_port ]
74 '--test_case=%s' % test ]
75 if self._board: args.append('--board=%s' % self._board) 74 if self._board: args.append('--board=%s' % self._board)
76 if self._image_path: args.append('--image_path=%s' % self._image_path) 75 if self._image_path: args.append('--image_path=%s' % self._image_path)
77 if self._results_dir_root: 76 if self._results_dir_root:
78 args.append('--results_dir_root=%s/%s.%d' % 77 args.append('--results_dir_root=%s/%s.%d' %
79 (self._results_dir_root, test, ssh_port)) 78 (self._results_dir_root, test, ssh_port))
80 if self._use_emerged: args.append('--use_emerged') 79 if self._use_emerged: args.append('--use_emerged')
80 args.append(test)
81 Info('Running %r...' % args) 81 Info('Running %r...' % args)
82 output = None 82 output = None
83 if self._order_output: 83 if self._order_output:
84 output = tempfile.NamedTemporaryFile(prefix='parallel_vm_test_') 84 output = tempfile.NamedTemporaryFile(prefix='parallel_vm_test_')
85 Info('Piping output to %s.' % output.name) 85 Info('Piping output to %s.' % output.name)
86 proc = subprocess.Popen(args, stdout=output, stderr=output) 86 proc = subprocess.Popen(args, stdout=output, stderr=output)
87 test_info = { 'test': test, 87 test_info = { 'test': test,
88 'proc': proc, 88 'proc': proc,
89 'output': output } 89 'output': output }
90 spawned_tests.append(test_info) 90 spawned_tests.append(test_info)
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 Die('no tests provided') 154 Die('no tests provided')
155 155
156 runner = ParallelTestRunner(args, options.base_ssh_port, options.board, 156 runner = ParallelTestRunner(args, options.base_ssh_port, options.board,
157 options.image_path, options.order_output, 157 options.image_path, options.order_output,
158 options.results_dir_root, options.use_emerged) 158 options.results_dir_root, options.use_emerged)
159 runner.Run() 159 runner.Run()
160 160
161 161
162 if __name__ == '__main__': 162 if __name__ == '__main__':
163 main() 163 main()
OLDNEW
« no previous file with comments | « bin/cbuildbot.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698