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

Unified Diff: au_test_harness/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/au_test.py ('k') | au_test_harness/parallel_test_job.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: au_test_harness/au_worker.py
diff --git a/au_test_harness/au_worker.py b/au_test_harness/au_worker.py
index 701a12ae63d25f02c54ca6722cbc0ae76d11f5a7..a25de7fff749138b2d8feed80ab3d253ef9fa443 100644
--- a/au_test_harness/au_worker.py
+++ b/au_test_harness/au_worker.py
@@ -232,9 +232,19 @@ class AUWorker(object):
unittest.assertTrue(percent_passed >= percent_required_to_pass)
return percent_passed
- def InitializeResultsDirectory(self):
- """Called by a test to initialize a results directory for this worker."""
- # Use the name of the test.
+ def Initialize(self, port):
+ """Initializes test specific variables for each test.
+
+ Each test needs to specify a unique ssh port.
+
+ Args:
+ port: Unique port for ssh access.
+ """
+ # Initialize port vars.
+ self._ssh_port = port
+ self._kvm_pid_file = '/tmp/kvm.%d' % port
+
+ # Initialize test results directory.
test_name = inspect.stack()[1][3]
self.results_directory = os.path.join(self.test_results_root, test_name)
self.results_count = 0
« no previous file with comments | « au_test_harness/au_test.py ('k') | au_test_harness/parallel_test_job.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698