New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 770751 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

run-webkit-tests: Add a "live-rerun" feature.

Project Member Reported by qyears...@chromium.org, Oct 2 2017

Issue description

A fair amount of time in a run-webkit-tests test run is spent on overhead, e.g. starting and stopping servers, updating the wpt manifest, etc.

When running one test locally (e.g. for debugging), most of the time is overhead. The change-test-debug cycle could be made much faster if run-webkit-tests had a mode where it stayed running and reran the tests when test files changed.

Will, you proposed this, right?
 
Yup - probably won't get it done right away but happy to work on this as a 20% project.
Alright :-)

The place I'd start to look is in webkitpy/layout_tests/controllers/manager.py: The "wait for file change then run" loop would have to go somewhere around:
https://cs.chromium.org/chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py?l=152

This would require adding functionality for waiting for file change; if this is platform-specific, it would go in Port (webkitpy/layout_tests/port/*).

That part of Manager could potentially have part of it extracted out to another method to make the run-wait loop clearer.
Cc: -chenwilliam@chromium.org
Owner: chenwilliam@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0230825321563aba951fe5badf6ae6925bab59b7

commit 0230825321563aba951fe5badf6ae6925bab59b7
Author: Will Chen <chenwilliam@chromium.org>
Date: Wed Oct 11 05:54:57 2017

Layout Tests: add --watch to quickly re-run the same test

Oftentimes, a developer is fixing a failing test and needs to re-run
it several times in a row as they iterate on it. Right now, the startup
time of the layout test python test harness is ~2.5 seconds on a Linux workstation.

Typically in a test framework, the watch mode is triggered upon a change in the test
file, but watching filesystem changes is platform-specific and could be buggier
whereas asking the user to retry a test is simple to implement and covers more
cases (e.g. they might be changing production code to make a layout test pass).

Usage: --watch or -w

Example:
```
Found 1 test; running 1, skipping 0.
Running 1 content_shell.                                                                         

Finished running tests
Interactive watch mode: (q)uit (r)etry
Command: r
Running 1 content_shell.
```

Bug:  770751 
Change-Id: I0a5e0648717ee6031dd804490677fb8576a58174
Reviewed-on: https://chromium-review.googlesource.com/706352
Commit-Queue: Will Chen <chenwilliam@chromium.org>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507905}
[modify] https://crrev.com/0230825321563aba951fe5badf6ae6925bab59b7/third_party/WebKit/Tools/Scripts/webkitpy/common/system/user_mock.py
[modify] https://crrev.com/0230825321563aba951fe5badf6ae6925bab59b7/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
[modify] https://crrev.com/0230825321563aba951fe5badf6ae6925bab59b7/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
[modify] https://crrev.com/0230825321563aba951fe5badf6ae6925bab59b7/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py

Status: Fixed (was: Assigned)
The main functionality is there, although plenty of future improvements could be made:
e.g. handling non text diffs better, showing text diffs inline in terminal, actually watching filesystem for test file changed.

Sign in to add a comment