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

Unified Diff: bin/cros_au_test_harness.py

Issue 5988006: Add new script to stop a kvm using vm library and use in harness. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Fix docstring Created 10 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | bin/cros_stop_vm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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."""
« no previous file with comments | « no previous file | bin/cros_stop_vm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698