New issue
Advanced search Search tips

Issue 738818 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Sep 24
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[WPT import] "Updating TestExpectations for any removed or renamed tests" should also update directories

Project Member Reported by foolip@chromium.org, Jul 3 2017

Issue description

Running a manual wpt-import today, "Updating TestExpectations for any removed or renamed tests" appeared on the console, but when running tests:

--lint-test-files warnings:                        
third_party/WebKit/LayoutTests/NeverFixTests:265 Path does not exist. external/wpt/fonts/matching

This was using Chromium 92a96f7633e53bb4a4d76651a4b5834c58f6a34b and wpt 7a7d61501e55b291d73ad983b19678e7cd26ead3.
 
Wait, I see what happened here. NeverFixTests had the name of a directory. That directory was renaming, but detecting that is not straightforward.

qyearsley@, is there anything that could be improved here?
Cc: jeffcarp@chromium.org foolip@chromium.org
Definitely -- apparently I had left a comment in the code saying:

    # FIXME: This won't work for removed or renamed directories with test expectations
    # that are directories rather than individual tests.

https://chromium.googlesource.com/chromium/src/+/641d6ea3c14c4623020cf40edb68520abb2a4e3c/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py#466


This functionality currently works by:
 1. Using `git diff` to list changed/deleted files
 2. Iterating through lines and removing or updating them if there's an exact match

If we could list changed/deleted directories in addition to files, then updating lines with directories should also work as well.


Do you happen to know a good way to list directories that are removed or renamed?

My current idea would be to use the output from git diff (which lists individual files) plus invocations of FileSystem.exists:
 1. For each deleted file, if the directory that the file is in does not exist, then that directory is deleted.
 2. For each renamed file, if the source directory doesn't exist, then: if the number of files in the new directory is the same as the number of files moved into the new directory, then the directory is renamed.

The renaming case is a little more complex because you could also be merging files into a bigger directory or splitting files between two new directories, etc.
Summary: [WPT import] "Updating TestExpectations for any removed or renamed tests" should also update NeverFixTests (was: "Updating TestExpectations for any removed or renamed tests" should also update NeverFixTests)
Summary: [WPT import] "Updating TestExpectations for any removed or renamed tests" should also update directories (was: [WPT import] "Updating TestExpectations for any removed or renamed tests" should also update NeverFixTests)
Cc: drott@chromium.org qyears...@chromium.org
 Issue 739122  has been merged into this issue.
Owner: ----
Status: Available (was: Assigned)
Project Member

Comment 7 by sheriffbot@chromium.org, Aug 14

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Archived (was: Untriaged)

Sign in to add a comment