Bug 118293 - [webkitpy] Add run-tests-touched-by-attachment command
Summary: [webkitpy] Add run-tests-touched-by-attachment command
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 118294
Blocks: 117831
  Show dependency treegraph
 
Reported: 2013-07-02 05:04 PDT by Csaba Osztrogonác
Modified: 2014-12-03 03:53 PST (History)
5 users (show)

See Also:


Attachments
WIP patch (6.21 KB, patch)
2013-07-02 06:47 PDT, János Badics
ossy: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2013-07-02 05:04:56 PDT
We need a new run-tests-touched-by-attachment command for webkit-patch.

It should download the given attachment from bugzilla, apply the patch,
build with the patch, determine which tests or expected files are touched
by the attachment on any platform, run only these tests.

It will be necessary for the rebaseline helper tools.
See https://bugs.webkit.org/show_bug.cgi?id=117831 for details.
Comment 1 János Badics 2013-07-02 06:47:15 PDT
Created attachment 205907 [details]
WIP patch

The tool can be run by
'Tools/Scripts/webkit-patch run-tests-touched-by-attachment [ATTACHMENT_ID]'

At the current state, the tool gets the paths of modified expected txt/png files. Then it determines the filename without the '-expected' suffix and the file extension. _test_relative_dir() determines the relative generic directory path for the given test, e.g.
LayoutTests/platform/qt-5.0-wk1/editing/deleting/delete-cell-contents-expected.txt ->
editing/deleting/
Then _tests_in_dir gets the paths of all the tests found in this directory. As a last step, the loop in _first_generic_by_filename() gets the first match to the given file name.
I know it's a bit ineffective, but we have to look up the extension for the given test file name, since a lot of extensions are supported for test files (htm, html, xhtml, etc.).

Further modifications are also needed, especially the ones recommended by Ryosuke Niwa at https://bugs.webkit.org/show_bug.cgi?id=117831
Comment 2 Csaba Osztrogonác 2014-12-03 03:53:10 PST
no interest in it anymore