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

Issue 12317059: [Andoid] Threaded TestRunner creation and SetUp and TearDown calls. (Closed)

Created:
7 years, 10 months ago by craigdh
Modified:
7 years, 9 months ago
Reviewers:
frankf, nilesh
CC:
chromium-reviews, klundberg+watch_chromium.org, frankf+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy+watch_chromium.org
Visibility:
Public.

Description

[Andoid] Threaded TestRunner creation and SetUp and TearDown calls. Create TestRunners only once and only call SetUp and TearDown once. BUG=176325, 168889 TEST=pylib/utils/raiser_thread_unittest.py, pylib/base/shard_unittest.py, run_tests.py Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=185276

Patch Set 1 #

Total comments: 5

Patch Set 2 : ignore device failures during teardown and allow all threads to complete before reraising exceptions #

Patch Set 3 : rebase #

Patch Set 4 : rewrites retry logic using threads #

Patch Set 5 : #

Total comments: 1

Patch Set 6 : clear data and kill process between tests #

Total comments: 4

Patch Set 7 : added TestPackage.ClearApplicationState() #

Total comments: 1

Patch Set 8 : nit #

Total comments: 6

Patch Set 9 : Clean up _RunTestsFromQueue logic and add comments. #

Patch Set 10 : improved naming, comments, and simplified logic in threadsafe test collection #

Total comments: 1

Patch Set 11 : #

Patch Set 12 : small fix in the device not responding case' #

Patch Set 13 : add #override #

Patch Set 14 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+421 lines, -144 lines) Patch
M build/android/pylib/base/new_base_test_runner.py View 1 chunk +7 lines, -15 lines 0 comments Download
M build/android/pylib/base/shard.py View 1 2 3 4 5 6 7 8 9 10 4 chunks +168 lines, -89 lines 0 comments Download
M build/android/pylib/base/shard_unittest.py View 1 2 3 4 5 6 7 8 9 3 chunks +76 lines, -38 lines 0 comments Download
M build/android/pylib/gtest/test_package.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M build/android/pylib/gtest/test_package_apk.py View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M build/android/pylib/gtest/test_package_executable.py View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M build/android/pylib/gtest/test_runner.py View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +4 lines, -2 lines 0 comments Download
A build/android/pylib/utils/reraiser_thread.py View 1 1 chunk +74 lines, -0 lines 0 comments Download
A build/android/pylib/utils/reraiser_thread_unittest.py View 1 1 chunk +80 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
craigdh
ptal. https://codereview.chromium.org/12317059/diff/1/build/android/pylib/utils/reraiser_thread_unittest.py File build/android/pylib/utils/reraiser_thread_unittest.py (right): https://codereview.chromium.org/12317059/diff/1/build/android/pylib/utils/reraiser_thread_unittest.py#newcode5 build/android/pylib/utils/reraiser_thread_unittest.py:5: """Unittests for shard.py.""" should be reraiser_thread.py
7 years, 10 months ago (2013-02-22 00:57:42 UTC) #1
nilesh
I think we need both Setup and SetupOnce. Setup (called before each call to RunTest) ...
7 years, 10 months ago (2013-02-22 01:08:07 UTC) #2
craigdh
On 2013/02/22 01:08:07, nileshagrawal1 wrote: > I think we need both Setup and SetupOnce. > ...
7 years, 10 months ago (2013-02-22 01:24:56 UTC) #3
nilesh
On 2013/02/22 01:24:56, craigdh wrote: > On 2013/02/22 01:08:07, nileshagrawal1 wrote: > > I think ...
7 years, 10 months ago (2013-02-22 01:33:58 UTC) #4
nilesh
https://codereview.chromium.org/12317059/diff/1/build/android/pylib/base/shard.py File build/android/pylib/base/shard.py (right): https://codereview.chromium.org/12317059/diff/1/build/android/pylib/base/shard.py#newcode131 build/android/pylib/base/shard.py:131: runners = _CreateRunners(runner_factory, set(devices)) I think the numbers of ...
7 years, 10 months ago (2013-02-22 02:00:29 UTC) #5
frankf
https://codereview.chromium.org/12317059/diff/1/build/android/pylib/base/shard.py File build/android/pylib/base/shard.py (right): https://codereview.chromium.org/12317059/diff/1/build/android/pylib/base/shard.py#newcode97 build/android/pylib/base/shard.py:97: threads.JoinAll() For all these JoinAll invokations, we need to ...
7 years, 10 months ago (2013-02-22 02:42:55 UTC) #6
craigdh
https://codereview.chromium.org/12317059/diff/1/build/android/pylib/base/shard.py File build/android/pylib/base/shard.py (right): https://codereview.chromium.org/12317059/diff/1/build/android/pylib/base/shard.py#newcode97 build/android/pylib/base/shard.py:97: threads.JoinAll() On 2013/02/22 02:42:55, frankf wrote: > For all ...
7 years, 10 months ago (2013-02-22 17:24:20 UTC) #7
craigdh
> - Device failures in _RunAllTests are handled by the retry logic, but that could ...
7 years, 10 months ago (2013-02-22 23:23:13 UTC) #8
nilesh
https://codereview.chromium.org/12317059/diff/2007/build/android/pylib/base/new_base_test_runner.py File build/android/pylib/base/new_base_test_runner.py (right): https://codereview.chromium.org/12317059/diff/2007/build/android/pylib/base/new_base_test_runner.py#newcode80 build/android/pylib/base/new_base_test_runner.py:80: """Run once before all tests are run.""" As discussed ...
7 years, 10 months ago (2013-02-22 23:50:40 UTC) #9
craigdh
On 2013/02/22 23:50:40, nileshagrawal1 wrote: > https://codereview.chromium.org/12317059/diff/2007/build/android/pylib/base/new_base_test_runner.py > File build/android/pylib/base/new_base_test_runner.py (right): > > https://codereview.chromium.org/12317059/diff/2007/build/android/pylib/base/new_base_test_runner.py#newcode80 > ...
7 years, 10 months ago (2013-02-23 01:13:18 UTC) #10
craigdh
On 2013/02/23 01:13:18, craigdh wrote: > On 2013/02/22 23:50:40, nileshagrawal1 wrote: > > > https://codereview.chromium.org/12317059/diff/2007/build/android/pylib/base/new_base_test_runner.py ...
7 years, 10 months ago (2013-02-23 01:16:48 UTC) #11
nilesh
https://codereview.chromium.org/12317059/diff/8003/build/android/pylib/gtest/test_runner.py File build/android/pylib/gtest/test_runner.py (right): https://codereview.chromium.org/12317059/diff/8003/build/android/pylib/gtest/test_runner.py#newcode247 build/android/pylib/gtest/test_runner.py:247: self.adb.ClearApplicationState(self._test_apk_package_name) I think the killAllblocking can be in else: ...
7 years, 10 months ago (2013-02-23 01:24:10 UTC) #12
craigdh
https://codereview.chromium.org/12317059/diff/8003/build/android/pylib/gtest/test_runner.py File build/android/pylib/gtest/test_runner.py (right): https://codereview.chromium.org/12317059/diff/8003/build/android/pylib/gtest/test_runner.py#newcode247 build/android/pylib/gtest/test_runner.py:247: self.adb.ClearApplicationState(self._test_apk_package_name) On 2013/02/23 01:24:10, nileshagrawal1 wrote: > I think ...
7 years, 10 months ago (2013-02-25 20:05:13 UTC) #13
nilesh
lgtm with nit. https://codereview.chromium.org/12317059/diff/12007/build/android/pylib/gtest/test_runner.py File build/android/pylib/gtest/test_runner.py (right): https://codereview.chromium.org/12317059/diff/12007/build/android/pylib/gtest/test_runner.py#newcode166 build/android/pylib/gtest/test_runner.py:166: self._test_apk_package_name = test_apk_package_name Nit: This is ...
7 years, 10 months ago (2013-02-25 21:27:49 UTC) #14
frankf
As discussed offline, it's much simpler to use two lists for scheduled tests, and in-progress ...
7 years, 10 months ago (2013-02-25 22:22:57 UTC) #15
frankf
https://codereview.chromium.org/12317059/diff/4002/build/android/pylib/base/shard.py File build/android/pylib/base/shard.py (right): https://codereview.chromium.org/12317059/diff/4002/build/android/pylib/base/shard.py#newcode39 build/android/pylib/base/shard.py:39: self._incomplete_count = len(self._items) incomplete_count -> tests_in_progress https://codereview.chromium.org/12317059/diff/4002/build/android/pylib/base/shard.py#newcode40 build/android/pylib/base/shard.py:40: self._can_pop ...
7 years, 10 months ago (2013-02-26 00:57:07 UTC) #16
craigdh
ptal. https://codereview.chromium.org/12317059/diff/4002/build/android/pylib/base/shard.py File build/android/pylib/base/shard.py (right): https://codereview.chromium.org/12317059/diff/4002/build/android/pylib/base/shard.py#newcode39 build/android/pylib/base/shard.py:39: self._incomplete_count = len(self._items) On 2013/02/26 00:57:07, frankf wrote: ...
7 years, 10 months ago (2013-02-26 01:23:16 UTC) #17
frankf
lgtm https://codereview.chromium.org/12317059/diff/11013/build/android/pylib/gtest/test_package_apk.py File build/android/pylib/gtest/test_package_apk.py (right): https://codereview.chromium.org/12317059/diff/11013/build/android/pylib/gtest/test_package_apk.py#newcode76 build/android/pylib/gtest/test_package_apk.py:76: def ClearApplicationState(self): nit: mark all overrides in both ...
7 years, 10 months ago (2013-02-26 01:32:31 UTC) #18
craigdh
7 years, 9 months ago (2013-02-28 18:19:39 UTC) #19
Message was sent while issue was closed.
Committed patchset #14 manually as r185276 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698