run-webkit-tests: Add a "live-rerun" feature. |
|||
Issue descriptionA 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?
,
Oct 2 2017
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.
,
Oct 3 2017
,
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
,
Nov 13 2017
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 |
|||
Comment 1 by chenwilliam@chromium.org
, Oct 2 2017