Bug 116698 - [Windows] NRWT reports failure for 'mac' test cases
Summary: [Windows] NRWT reports failure for 'mac' test cases
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords:
Depends on:
Blocks: 38756
  Show dependency treegraph
 
Reported: 2013-05-23 17:20 PDT by Brent Fulgham
Modified: 2013-05-28 15:58 PDT (History)
5 users (show)

See Also:


Attachments
Screenshot of example output from NRWT. (2.17 MB, image/png)
2013-05-23 17:20 PDT, Brent Fulgham
no flags Details
Screenshot of ORWT output for same build (1.20 MB, image/png)
2013-05-23 17:21 PDT, Brent Fulgham
no flags Details
Patch (2.71 KB, patch)
2013-05-28 12:16 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch (3.09 KB, patch)
2013-05-28 14:54 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Uses dpranke's suggested syntax for excluding mac paths. (3.72 KB, patch)
2013-05-28 15:46 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Uses dpranke's suggested syntax for excluding the mac test folders. (3.10 KB, patch)
2013-05-28 15:48 PDT, Brent Fulgham
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2013-05-23 17:20:47 PDT
Created attachment 202755 [details]
Screenshot of example output from NRWT.

When running ORWT on the Apple Windows port, several test results 'fall back' to the mac port for expected results.  NRWT also appears to be checking the 'mac' port output folder, but registers a number of items as failures even though there are existing 'win' results that should be overriding these expected results.
Comment 1 Brent Fulgham 2013-05-23 17:21:07 PDT
Created attachment 202756 [details]
Screenshot of ORWT output for same build
Comment 2 Brent Fulgham 2013-05-28 12:16:31 PDT
Created attachment 203076 [details]
Patch
Comment 3 Brent Fulgham 2013-05-28 12:17:05 PDT
Delaying processing of this patch until I run local tests on my Windows builder.
Comment 4 Brent Fulgham 2013-05-28 13:27:38 PDT
Patch seems to work properly.  There were originally 336 failures (with 258 of them coming from the platform/mac folder).  Now there are 78 failures.
Comment 5 Dirk Pranke 2013-05-28 14:16:46 PDT
Comment on attachment 203076 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=203076&action=review

> Tools/Scripts/webkitpy/port/win.py:144
> +        return dirs_to_skip

There's too much duplicated code in these routines, I think. 

What I would probably try to do is change the implementation of _tests_for_other_platforms() in base.py to call a new test_search_path() in base.py (like you have here), define test_search_path() in base.py as calling baseline_search_path() (to get the same logic by default), and then override test_search_path() in win.py to call the super method, but filter out the mac ports.

Does that make sense?
Comment 6 Brent Fulgham 2013-05-28 14:54:53 PDT
Created attachment 203094 [details]
Patch
Comment 7 Ryosuke Niwa 2013-05-28 14:57:37 PDT
Comment on attachment 203094 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=203094&action=review

> Tools/Scripts/webkitpy/port/win.py:124
> +        # Remove the mac tests, which we never want to execute
> +        regex = re.compile('mac.*')

We don't need to use a regex for this. Also, this regex is going to match anything that happens to start with "mac"; e.g. maclaine.

> Tools/Scripts/webkitpy/port/win.py:125
> +        test_fallback_names = [x for x in self.baseline_search_path() if not regex.match(x)]

Please don't use one letter variable like x. spell out path. We can do path.startswith('mac/') instead.
Comment 8 Dirk Pranke 2013-05-28 14:58:53 PDT
Comment on attachment 203094 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=203094&action=review

>> Tools/Scripts/webkitpy/port/win.py:125
>> +        test_fallback_names = [x for x in self.baseline_search_path() if not regex.match(x)]
> 
> Please don't use one letter variable like x. spell out path. We can do path.startswith('mac/') instead.

I was also going to suggest x.startswith('mac'). You can't use 'mac/', since the slash isn't in the path. However, since baseline_search_path is just a list of dirs, I don't think you need to worry about 'maclaine' or other likely conflicts.
Comment 9 Ryosuke Niwa 2013-05-28 14:59:55 PDT
Comment on attachment 203094 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=203094&action=review

>>> Tools/Scripts/webkitpy/port/win.py:125
>>> +        test_fallback_names = [x for x in self.baseline_search_path() if not regex.match(x)]
>> 
>> Please don't use one letter variable like x. spell out path. We can do path.startswith('mac/') instead.
> 
> I was also going to suggest x.startswith('mac'). You can't use 'mac/', since the slash isn't in the path. However, since baseline_search_path is just a list of dirs, I don't think you need to worry about 'maclaine' or other likely conflicts.

I see.
Comment 10 Brent Fulgham 2013-05-28 15:25:24 PDT
(In reply to comment #7)
> (From update of attachment 203094 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=203094&action=review
> 
> > Tools/Scripts/webkitpy/port/win.py:124
> > +        # Remove the mac tests, which we never want to execute
> > +        regex = re.compile('mac.*')
> 
> We don't need to use a regex for this. Also, this regex is going to match anything that happens to start with "mac"; e.g. maclaine.

That's the desired behavior --we want to exclude mac, mac-lion, mac-future, etc.
Comment 11 Brent Fulgham 2013-05-28 15:38:38 PDT
(In reply to comment #8)
> (From update of attachment 203094 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=203094&action=review
> 
> >> Tools/Scripts/webkitpy/port/win.py:125
> >> +        test_fallback_names = [x for x in self.baseline_search_path() if not regex.match(x)]
> > 
> > Please don't use one letter variable like x. spell out path. We can do path.startswith('mac/') instead.
> 
> I was also going to suggest x.startswith('mac'). You can't use 'mac/', since the slash isn't in the path. However, since baseline_search_path is just a list of dirs, I don't think you need to worry about 'maclaine' or other likely conflicts.

The result of calling self.baseline_search_path() is an expanded set of directories, such as:

['/cygdrive/c/Projects/WebKit/OpenSource/LayoutTests/platform/win',
 '/cygdrive/c/Projects/WebKit/OpenSource/LayoutTests/platform/mac-lion',
 '/cygdrive/c/Projects/WebKit/OpenSource/LayoutTests/platform/mac']

Consequently, we can't just search on 'starts with'.

The regex allowed me to get rid of the mac and mac-lion cases here, though I suppose it might have clobbered some future path.
Comment 12 Brent Fulgham 2013-05-28 15:46:24 PDT
Created attachment 203101 [details]
Uses dpranke's suggested syntax for excluding mac paths.
Comment 13 Brent Fulgham 2013-05-28 15:48:00 PDT
Created attachment 203102 [details]
Uses dpranke's suggested syntax for excluding the mac test folders.
Comment 14 Ryosuke Niwa 2013-05-28 15:55:44 PDT
Comment on attachment 203102 [details]
Uses dpranke's suggested syntax for excluding the mac test folders.

View in context: https://bugs.webkit.org/attachment.cgi?id=203102&action=review

> Tools/Scripts/webkitpy/port/win.py:123
> +        # Remove the mac tests, which we never want to execute

This comment more or less repeats the code. Please remove it.
Comment 15 Brent Fulgham 2013-05-28 15:58:49 PDT
Committed r150850: <http://trac.webkit.org/changeset/150850>