Index: bin/cros_au_test_harness.py |
diff --git a/bin/cros_au_test_harness.py b/bin/cros_au_test_harness.py |
index 6e537036aee10916490d24ef72bb76fe3fbd8c73..5d5b221760c0dab765dd10645ca088f2daf24681 100755 |
--- a/bin/cros_au_test_harness.py |
+++ b/bin/cros_au_test_harness.py |
@@ -446,12 +446,10 @@ class VirtualAUTest(unittest.TestCase, AUTest): |
if os.path.exists(pid_file): |
Warning('Existing %s found. Deleting and killing process' % |
pid_file) |
- pid = RunCommand(['sudo', 'cat', pid_file], redirect_stdout=True, |
- enter_chroot=False) |
- if pid: |
- RunCommand(['sudo', 'kill', pid.strip()], error_ok=True, |
- enter_chroot=False) |
- RunCommand(['sudo', 'rm', pid_file], enter_chroot=False) |
+ RunCommand(['./cros_stop_vm', '--kvm_pid=%s' % pid_file], |
+ cwd=self.crosutilsbin) |
+ |
+ assert not os.path.exists(pid_file) |
def setUp(self): |
"""Unit test overriden method. Is called before every test.""" |