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

Unified Diff: au_test_harness/vm_au_worker.py

Issue 6815003: This CL updates the parallel job library in the au test harness to be more robust. (Closed) Base URL: http://git.chromium.org/git/crostestutils.git@master
Patch Set: Don's feedback Created 9 years, 8 months 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 | « au_test_harness/parallel_test_job.py ('k') | ctest/ctest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: au_test_harness/vm_au_worker.py
diff --git a/au_test_harness/vm_au_worker.py b/au_test_harness/vm_au_worker.py
index b5925cca4ba6669dd5964b4c1574a178e8ae88f8..f64515e64542db8731c4fbc0ed44caa43edf05fc 100644
--- a/au_test_harness/vm_au_worker.py
+++ b/au_test_harness/vm_au_worker.py
@@ -5,7 +5,6 @@
"""Module containing implementation of an au_worker for virtual machines."""
import os
-import threading
import unittest
import cros_build_lib as cros_lib
@@ -16,10 +15,6 @@ import au_worker
class VMAUWorker(au_worker.AUWorker):
"""Test harness for updating virtual machines."""
- # Class variables used to acquire individual VM variables per test.
- _vm_lock = threading.Lock()
- _next_port = 9222
-
def __init__(self, options, test_results_root):
"""Processes vm-specific options."""
au_worker.AUWorker.__init__(self, options, test_results_root)
@@ -27,9 +22,6 @@ class VMAUWorker(au_worker.AUWorker):
if options.no_graphics: self.graphics_flag = '--no_graphics'
if not self.board: cros_lib.Die('Need board to convert base image to vm.')
- self._AcquireUniquePortAndPidFile()
- self._KillExistingVM(self._kvm_pid_file)
-
def _KillExistingVM(self, pid_file):
"""Kills an existing VM specified by the pid_file."""
if os.path.exists(pid_file):
@@ -40,13 +32,6 @@ class VMAUWorker(au_worker.AUWorker):
assert not os.path.exists(pid_file)
- def _AcquireUniquePortAndPidFile(self):
- """Acquires unique ssh port and pid file for VM."""
- with VMAUWorker._vm_lock:
- self._ssh_port = VMAUWorker._next_port
- self._kvm_pid_file = '/tmp/kvm.%d' % self._ssh_port
- VMAUWorker._next_port += 1
-
def CleanUp(self):
"""Stop the vm after a test."""
self._KillExistingVM(self._kvm_pid_file)
« no previous file with comments | « au_test_harness/parallel_test_job.py ('k') | ctest/ctest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698