New issue
Advanced search Search tips

Issue 702953 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature

Blocked on:
issue 507796
issue 649762
issue 690085



Sign in to add a comment

Refactor chromium_tests' steps.py to eliminate Local/Swarming inheritance hierarchy split

Project Member Reported by kbr@chromium.org, Mar 19 2017

Issue description

The dynamically generated test steps which Pawel introduced in https://chromium.googlesource.com/chromium/tools/build/+/master/scripts/slave/recipe_modules/chromium_tests/steps.py some time ago are a valuable piece of Chromium's testing infrastructure. JSON files in the Chromium workspace control the instantiation of these Test objects, and changes to those JSON files can be sent through tryservers, ensuring they don't break.

Part of the difficulty in maintaining these classes is that there is a split deep in the inheritance hierarchy between tests run locally and tests run on Swarming. (Some waterfall bots, like one-off GPU configurations, do the former.) This came up most recently in  Issue 690085  and sergiyb's https://chromium-review.googlesource.com/445788/ , though it's also come up in earlier bugs like  Issue 649762 ,  Issue 507796 , and others.

One idea to eliminate this split would be to refactor the Test classes into a bunch of handlers, and use composition of these handlers rather than inheritance to express the logic. I think that for a given test type, the particulars of launching the test and the handling of its results should be able to be factored out and shared across the "Local" and "Swarming" variants.

Then, ideally, these two flavors could just be two different instances of the same Test class. One would be configured with an instance of the Swarming handler which knows how to launch all kinds of tests on Swarming, and the other would know how to do the same locally. The Test hierarchy with its many subclasses might be able to be collapsed into one class -- or at least a smaller number than now. This would improve maintainability.
 
Components: Infra>Client>Chrome
Components: -Infra>Platform>Recipes
Not a recipe platform issue.
Cc: -phajdan.jr@chromium.org jbudorick@chromium.org
John's been doing some work related to this, right?
Owner: jbudorick@chromium.org
Status: Assigned (was: Untriaged)
yeah, I've been making a bunch of changes in chromium_tests/steps.py.

Sign in to add a comment