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

Side by Side Diff: bin/cros_au_test_harness.py

Issue 3967002: Fix args to RunCommand (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Fix print Created 10 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « bin/cbuildbot.py ('k') | lib/cros_build_lib.py » ('j') | 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 220
221 def PrepareBase(self): 221 def PrepareBase(self):
222 """Creates an update-able VM based on base image.""" 222 """Creates an update-able VM based on base image."""
223 223
224 self.vm_image_path = ('%s/chromiumos_qemu_image.bin' % os.path.dirname( 224 self.vm_image_path = ('%s/chromiumos_qemu_image.bin' % os.path.dirname(
225 base_image_path)) 225 base_image_path))
226 if not os.path.exists(self.vm_image_path): 226 if not os.path.exists(self.vm_image_path):
227 Info('Qemu image not found, creating one.') 227 Info('Qemu image not found, creating one.')
228 RunCommand(['%s/image_to_vm.sh' % self.crosutils, 228 RunCommand(['%s/image_to_vm.sh' % self.crosutils,
229 '--full', 229 '--full',
230 '--from %s' % ReinterpretPathForChroot( 230 '--from=%s' % ReinterpretPathForChroot(
231 os.path.dirname(base_image_path)), 231 os.path.dirname(base_image_path)),
232 '--vdisk_size %s' % _FULL_VDISK_SIZE, 232 '--vdisk_size=%s' % _FULL_VDISK_SIZE,
233 '--statefulfs_size %s' % _FULL_STATEFULFS_SIZE, 233 '--statefulfs_size=%s' % _FULL_STATEFULFS_SIZE,
234 '--board %s' % board, 234 '--board=%s' % board,
235 '--test_image'], enter_chroot=True) 235 '--test_image'], enter_chroot=True)
236 else: 236 else:
237 Info('Using existing VM image') 237 Info('Using existing VM image')
238 238
239 self.assertTrue(os.path.exists(self.vm_image_path)) 239 self.assertTrue(os.path.exists(self.vm_image_path))
240 240
241 def UpdateImage(self, image_path, stateful_change='old'): 241 def UpdateImage(self, image_path, stateful_change='old'):
242 """Updates VM image with image_path.""" 242 """Updates VM image with image_path."""
243 stateful_change_flag = self.GetStatefulChangeFlag(stateful_change) 243 stateful_change_flag = self.GetStatefulChangeFlag(stateful_change)
244 244
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 else: 317 else:
318 remote = options.remote 318 remote = options.remote
319 319
320 suite = unittest.TestLoader().loadTestsFromTestCase(RealAUTest) 320 suite = unittest.TestLoader().loadTestsFromTestCase(RealAUTest)
321 test_result = unittest.TextTestRunner(verbosity=2).run(suite) 321 test_result = unittest.TextTestRunner(verbosity=2).run(suite)
322 else: 322 else:
323 parser.error('Could not parse harness type %s.' % options.type) 323 parser.error('Could not parse harness type %s.' % options.type)
324 324
325 if not test_result.wasSuccessful(): 325 if not test_result.wasSuccessful():
326 Die('Test harness was not successful') 326 Die('Test harness was not successful')
OLDNEW
« no previous file with comments | « bin/cbuildbot.py ('k') | lib/cros_build_lib.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698