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

Issue 6815003: This CL updates the parallel job library in the au test harness to be more robust. (Closed)

Created:
9 years, 8 months ago by sosa
Modified:
9 years, 6 months ago
Reviewers:
dgarrett
CC:
chromium-os-reviews_chromium.org
Visibility:
Public.

Description

This CL updates the parallel job library in the au test harness to be more robust. Specifically, we migrate to using multiprocessing.Process rather than threading.Thread which allows us to terminate pesky threads in the event a job takes too long. In addition it allows us to remove some redundancy that was needed for threading.Thread. I've also refactored the "waiting" code into the ParallelJob class and made it possible to test with ctest --cache. Change-Id: I7b691b676defb9d2140b006b5731874c7a08562c BUG=chromium-os:11168, chromium-os:13027 TEST=Ran ctest on x86-generic using new CL logic that lets me do so. Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=70e4ebf

Patch Set 1 #

Patch Set 2 : Crap #

Patch Set 3 : Last fixes #

Total comments: 8

Patch Set 4 : Don's feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -89 lines) Patch
M au_test_harness/au_test.py View 1 2 3 7 chunks +11 lines, -7 lines 0 comments Download
M au_test_harness/au_worker.py View 1 1 chunk +13 lines, -3 lines 0 comments Download
M au_test_harness/parallel_test_job.py View 1 2 3 2 chunks +87 lines, -59 lines 0 comments Download
M au_test_harness/vm_au_worker.py View 1 4 chunks +0 lines, -15 lines 0 comments Download
M ctest/ctest.py View 2 chunks +8 lines, -5 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
sosa
Finally getting this out :)
9 years, 8 months ago (2011-04-07 23:03:50 UTC) #1
dgarrett
Generally looks good, but a couple of questions. The main one is that it seems ...
9 years, 8 months ago (2011-04-08 03:56:42 UTC) #2
sosa
9 years, 8 months ago (2011-04-08 18:59:04 UTC) #3
Gonna push.  Thanks for the review!

http://codereview.chromium.org/6815003/diff/5001/au_test_harness/parallel_tes...
File au_test_harness/parallel_test_job.py (right):

http://codereview.chromium.org/6815003/diff/5001/au_test_harness/parallel_tes...
au_test_harness/parallel_test_job.py:20: """Small wrapper for Process that
stores output of a its target method."""
it's == it is :)

On 2011/04/08 03:56:42, dgarrett wrote:
> its -> it's

http://codereview.chromium.org/6815003/diff/5001/au_test_harness/parallel_tes...
au_test_harness/parallel_test_job.py:22: MAX_TIMEOUT = 1800
On 2011/04/08 03:56:42, dgarrett wrote:
> Units?

Done.

http://codereview.chromium.org/6815003/diff/5001/au_test_harness/parallel_tes...
au_test_harness/parallel_test_job.py:122: job_start_semaphore =
threading.Semaphore(number_of_simultaneous_jobs)
I think you're right, switching to multiprocessing.Semaphore instead and tested
with -j 2 and saw all 4 tests still get run.

On 2011/04/08 03:56:42, dgarrett wrote:
> Is this semaphore really safe across processes instead of threads?

http://codereview.chromium.org/6815003/diff/5001/au_test_harness/parallel_tes...
au_test_harness/parallel_test_job.py:125: for job, args in map(_TwoTupleize,
jobs, jobs_args):
On 2011/04/08 03:56:42, dgarrett wrote:
> _TwoTupleize could be replaced in-line with "lambda x, y: (x, y)" but that's
> just a different style, not sure if it's better.

Done.

Powered by Google App Engine
This is Rietveld 408576698