From d0473d1e9f523b5029b1b9ed4a6e662f387a4bcf Mon Sep 17 00:00:00 2001 From: Don Garrett Date: Thu, 18 Nov 2010 16:11:13 -0800 Subject: [PATCH] Don't pass "" to cros_run_vm_test if vm_graphics_flag isn't set. This would not have been a problem if "--no_graphics" is used. Change-Id: I3645391d25d4bb8618109ff5be0ca2fbe8e96a60 BUG=chromium-os:9373 TEST=Ran by hand Review URL: http://codereview.chromium.org/5104006 --- bin/cros_au_test_harness.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/bin/cros_au_test_harness.py b/bin/cros_au_test_harness.py index 7342310ce7..bedd16e094 100755 --- a/bin/cros_au_test_harness.py +++ b/bin/cros_au_test_harness.py @@ -274,15 +274,20 @@ class VirtualAUTest(unittest.TestCase, AUTest): """Runs vm smoke suite to verify image.""" # image_to_live already verifies lsb-release matching. This is just # for additional steps. - output = RunCommand(['%s/cros_run_vm_test' % self.crosutilsbin, - '--image_path=%s' % self.vm_image_path, - '--snapshot', - '--persist', - vm_graphics_flag, - '--kvm_pid=%s' % _KVM_PID_FILE, - '--test_case=%s' % _VERIFY_SUITE, - ], error_ok=True, enter_chroot=False, - redirect_stdout=True) + + commandWithArgs = ['%s/cros_run_vm_test' % self.crosutilsbin, + '--image_path=%s' % self.vm_image_path, + '--snapshot', + '--persist', + '--kvm_pid=%s' % _KVM_PID_FILE, + _VERIFY_SUITE, + ] + + if vm_graphics_flag: + commandWithArgs.append(vm_graphics_flag) + + output = RunCommand(commandWithArgs, error_ok=True, enter_chroot=False, + redirect_stdout=True) return self.CommonVerifyImage(self, output, percent_required_to_pass)