mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 15:11:19 +02:00
Fix equals in RunCommand's in cbuildbot.
Change-Id: If8cdde42a470c3d07cfd41552cf95dea7567688b BUG= TEST=Ran cbuildbot. Review URL: http://codereview.chromium.org/3967002
This commit is contained in:
parent
9310bb6bd3
commit
aa4670315b
@ -83,7 +83,7 @@ def _GetAllGitRepos(buildroot, debug=False):
|
||||
redirect_stderr=True, print_cmd=debug)
|
||||
|
||||
# Extract all lines containg a project.
|
||||
extract_cmd = ["grep", "project name="]
|
||||
extract_cmd = ['grep', 'project name=']
|
||||
output = RunCommand(extract_cmd, cwd=buildroot, input=output,
|
||||
redirect_stdout=True, print_cmd=debug)
|
||||
# Parse line using re to get tuple.
|
||||
@ -289,8 +289,8 @@ def _BuildVMImageForTesting(buildroot):
|
||||
RunCommand(['./image_to_vm.sh',
|
||||
'--test_image',
|
||||
'--full',
|
||||
'--vdisk_size %s' % vdisk_size,
|
||||
'--statefulfs_size %s' % statefulfs_size,
|
||||
'--vdisk_size=%s' % vdisk_size,
|
||||
'--statefulfs_size=%s' % statefulfs_size,
|
||||
], cwd=cwd, enter_chroot=True)
|
||||
|
||||
|
||||
@ -303,8 +303,7 @@ def _RunSmokeSuite(buildroot):
|
||||
cwd = os.path.join(buildroot, 'src', 'scripts')
|
||||
RunCommand(['bin/cros_run_vm_test',
|
||||
'--no_graphics',
|
||||
'--test_case',
|
||||
'suite_Smoke',
|
||||
'--test_case=suite_Smoke',
|
||||
], cwd=cwd, error_ok=False)
|
||||
|
||||
|
||||
@ -356,7 +355,7 @@ def _UprevPush(buildroot):
|
||||
cwd = os.path.join(buildroot, 'src', 'scripts')
|
||||
RunCommand(['./cros_mark_as_stable', '--srcroot=..',
|
||||
'--tracking_branch="cros/master"',
|
||||
'--push_options', '--bypass-hooks -f', 'push'],
|
||||
'--push_options="--bypass-hooks -f"', 'push'],
|
||||
cwd=cwd)
|
||||
|
||||
|
||||
|
@ -227,11 +227,11 @@ class VirtualAUTest(unittest.TestCase, AUTest):
|
||||
Info('Qemu image not found, creating one.')
|
||||
RunCommand(['%s/image_to_vm.sh' % self.crosutils,
|
||||
'--full',
|
||||
'--from %s' % ReinterpretPathForChroot(
|
||||
'--from=%s' % ReinterpretPathForChroot(
|
||||
os.path.dirname(base_image_path)),
|
||||
'--vdisk_size %s' % _FULL_VDISK_SIZE,
|
||||
'--statefulfs_size %s' % _FULL_STATEFULFS_SIZE,
|
||||
'--board %s' % board,
|
||||
'--vdisk_size=%s' % _FULL_VDISK_SIZE,
|
||||
'--statefulfs_size=%s' % _FULL_STATEFULFS_SIZE,
|
||||
'--board=%s' % board,
|
||||
'--test_image'], enter_chroot=True)
|
||||
else:
|
||||
Info('Using existing VM image')
|
||||
|
@ -54,8 +54,8 @@ def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None,
|
||||
|
||||
# Print out the command before running.
|
||||
if print_cmd:
|
||||
Info('PROGRAM(%s) -> RunCommand: %s in dir %s' %
|
||||
(GetCallerName(), ' '.join(cmd), cwd))
|
||||
Info('PROGRAM(%s) -> RunCommand: %r in dir %s' %
|
||||
(GetCallerName(), cmd, cwd))
|
||||
|
||||
try:
|
||||
proc = subprocess.Popen(cmd, cwd=cwd, stdin=stdin,
|
||||
@ -65,7 +65,7 @@ def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None,
|
||||
return proc.returncode
|
||||
|
||||
if not error_ok and proc.returncode:
|
||||
raise Exception('Command "%s" failed.\n' % (' '.join(cmd)) +
|
||||
raise Exception('Command "%r" failed.\n' % (cmd) +
|
||||
(error_message or error or output or ''))
|
||||
except Exception, e:
|
||||
if not error_ok:
|
||||
|
Loading…
x
Reference in New Issue
Block a user