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

Unified Diff: au_test_harness/parallel_test_job.py

Issue 6825019: Fix bug where if we get an exception an no output we don't hang. (Closed) Base URL: http://git.chromium.org/git/crostestutils.git@master
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: au_test_harness/parallel_test_job.py
diff --git a/au_test_harness/parallel_test_job.py b/au_test_harness/parallel_test_job.py
index 89befffe530175174deb4597f0ee8f84f1b4454e..483bd6948f8aa963e9a25296ee9d815333926ae1 100644
--- a/au_test_harness/parallel_test_job.py
+++ b/au_test_harness/parallel_test_job.py
@@ -104,7 +104,13 @@ def RunParallelJobs(number_of_simultaneous_jobs, jobs, jobs_args,
"""
def ProcessOutputWrapper(func, args, output):
"""Simple function wrapper that puts the output of a function in a queue."""
- output.put(func(*args))
+ try:
+ output.put(func(*args))
+ except:
+ output.put('')
+ raise
+ finally:
+ output.close()
assert len(jobs) == len(jobs_args), 'Length of args array is wrong.'
# Cache sudo access.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698