OLD | NEW |
1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Module containing implementation of an au_worker for virtual machines.""" | 5 """Module containing implementation of an au_worker for virtual machines.""" |
6 | 6 |
7 import os | 7 import os |
8 import unittest | 8 import unittest |
9 | 9 |
10 import cros_build_lib as cros_lib | 10 import cros_build_lib as cros_lib |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 '--snapshot', | 95 '--snapshot', |
96 '--persist', | 96 '--persist', |
97 '--kvm_pid=%s' % self._kvm_pid_file, | 97 '--kvm_pid=%s' % self._kvm_pid_file, |
98 '--ssh_port=%s' % self._ssh_port, | 98 '--ssh_port=%s' % self._ssh_port, |
99 '--results_dir_root=%s' % log_directory_in_chroot, | 99 '--results_dir_root=%s' % log_directory_in_chroot, |
100 self.verify_suite, | 100 self.verify_suite, |
101 ] | 101 ] |
102 if self.graphics_flag: commandWithArgs.append(self.graphics_flag) | 102 if self.graphics_flag: commandWithArgs.append(self.graphics_flag) |
103 self.TestInfo('Running smoke suite to verify image.') | 103 self.TestInfo('Running smoke suite to verify image.') |
104 output = cros_lib.RunCommand( | 104 output = cros_lib.RunCommand( |
105 commandWithArgs, error_ok=True, enter_chroot=False, | 105 commandWithArgs, error_ok=(percent_required_to_pass != 100), |
106 redirect_stdout=True, redirect_stderr=True, cwd=self.crosutilsbin, | 106 enter_chroot=False, redirect_stdout=True, redirect_stderr=True, |
107 print_cmd=False, combine_stdout_stderr=True) | 107 cwd=self.crosutilsbin, print_cmd=False, combine_stdout_stderr=True) |
108 return self.AssertEnoughTestsPassed(unittest, output, | 108 return self.AssertEnoughTestsPassed(unittest, output, |
109 percent_required_to_pass) | 109 percent_required_to_pass) |
110 | 110 |
OLD | NEW |