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

Side by Side Diff: bin/cros_au_test_harness.py

Issue 5104006: Don't pass "" to cros_run_vm_test if vm_graphics_flag isn't set. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Created 10 years, 1 month 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 | « no previous file | 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 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import optparse 7 import optparse
8 import os 8 import os
9 import sys 9 import sys
10 import unittest 10 import unittest
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 '--persist', 267 '--persist',
268 '--kvm_pid=%s' % _KVM_PID_FILE, 268 '--kvm_pid=%s' % _KVM_PID_FILE,
269 stateful_change_flag, 269 stateful_change_flag,
270 '--src_image=%s' % self.source_image, 270 '--src_image=%s' % self.source_image,
271 ], enter_chroot=False) 271 ], enter_chroot=False)
272 272
273 def VerifyImage(self, percent_required_to_pass): 273 def VerifyImage(self, percent_required_to_pass):
274 """Runs vm smoke suite to verify image.""" 274 """Runs vm smoke suite to verify image."""
275 # image_to_live already verifies lsb-release matching. This is just 275 # image_to_live already verifies lsb-release matching. This is just
276 # for additional steps. 276 # for additional steps.
277 output = RunCommand(['%s/cros_run_vm_test' % self.crosutilsbin, 277
278 '--image_path=%s' % self.vm_image_path, 278 commandWithArgs = ['%s/cros_run_vm_test' % self.crosutilsbin,
279 '--snapshot', 279 '--image_path=%s' % self.vm_image_path,
280 '--persist', 280 '--snapshot',
281 vm_graphics_flag, 281 '--persist',
282 '--kvm_pid=%s' % _KVM_PID_FILE, 282 '--kvm_pid=%s' % _KVM_PID_FILE,
283 '--test_case=%s' % _VERIFY_SUITE, 283 _VERIFY_SUITE,
284 ], error_ok=True, enter_chroot=False, 284 ]
285 redirect_stdout=True) 285
286 if vm_graphics_flag:
287 commandWithArgs.append(vm_graphics_flag)
288
289 output = RunCommand(commandWithArgs, error_ok=True, enter_chroot=False,
290 redirect_stdout=True)
286 return self.CommonVerifyImage(self, output, percent_required_to_pass) 291 return self.CommonVerifyImage(self, output, percent_required_to_pass)
287 292
288 293
289 if __name__ == '__main__': 294 if __name__ == '__main__':
290 parser = optparse.OptionParser() 295 parser = optparse.OptionParser()
291 parser.add_option('-b', '--base_image', 296 parser.add_option('-b', '--base_image',
292 help='path to the base image.') 297 help='path to the base image.')
293 parser.add_option('-t', '--target_image', 298 parser.add_option('-t', '--target_image',
294 help='path to the target image.') 299 help='path to the target image.')
295 parser.add_option('-r', '--board', 300 parser.add_option('-r', '--board',
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 else: 348 else:
344 remote = options.remote 349 remote = options.remote
345 350
346 suite = unittest.TestLoader().loadTestsFromTestCase(RealAUTest) 351 suite = unittest.TestLoader().loadTestsFromTestCase(RealAUTest)
347 test_result = unittest.TextTestRunner(verbosity=2).run(suite) 352 test_result = unittest.TextTestRunner(verbosity=2).run(suite)
348 else: 353 else:
349 parser.error('Could not parse harness type %s.' % options.type) 354 parser.error('Could not parse harness type %s.' % options.type)
350 355
351 if not test_result.wasSuccessful(): 356 if not test_result.wasSuccessful():
352 Die('Test harness was not successful') 357 Die('Test harness was not successful')
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698