Bug 75629 - NRWT fails to open results.html for Apple's Windows port
Summary: NRWT fails to open results.html for Apple's Windows port
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar, PlatformOnly
Depends on:
Blocks: 38756
  Show dependency treegraph
 
Reported: 2012-01-05 09:15 PST by Adam Roben (:aroben)
Modified: 2012-01-05 11:56 PST (History)
5 users (show)

See Also:


Attachments
Teach NRWT to use run-safari to open results.html on Apple's Windows port (3.75 KB, patch)
2012-01-05 11:36 PST, Adam Roben (:aroben)
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2012-01-05 09:15:00 PST
When NRWT tries to open results.html on Apple's Windows port, all that happens is this error message gets printed:

Failed to open file:///home/Adam%20Roben/dev/Build_WebKit/Debug/bin/layout-test-results/results.html
Comment 1 Adam Roben (:aroben) 2012-01-05 09:15:46 PST
Looks like the default implementation:

return self.host.user.open_url(self._filesystem.file_path_as_url(results_filename))

…doesn't work in Cygwin.
Comment 2 Radar WebKit Bug Importer 2012-01-05 09:16:00 PST
<rdar://problem/10648621>
Comment 3 Adam Roben (:aroben) 2012-01-05 09:16:24 PST
Ah, that's because User.open_url uses the webbrowser module, which doesn't work in Cygwin.
Comment 4 Eric Seidel (no email) 2012-01-05 10:11:45 PST
We'll probably have to make User smarter at some point.  This is not the only trouble we've had with this.  See bug 75438 for the most recent fix to this code.
Comment 5 Adam Roben (:aroben) 2012-01-05 10:38:20 PST
(In reply to comment #4)
> We'll probably have to make User smarter at some point.  This is not the only trouble we've had with this.  See bug 75438 for the most recent fix to this code.

A simple fix for User on Cygwin would be to use something like executive.run_command(['cygstart', url]).

But in this specific case we probably want to use run-safari instead.
Comment 6 Eric Seidel (no email) 2012-01-05 10:39:28 PST
I thought the ApplePort already overrode this method to use run-safari? Maybe I'm remembering wrong.
Comment 7 Adam Roben (:aroben) 2012-01-05 10:40:44 PST
(In reply to comment #6)
> I thought the ApplePort already overrode this method to use run-safari? Maybe I'm remembering wrong.

MacPort does that. We should move that logic up to ApplePort. We'll still need to override it on Windows so we can pass the path through cygpath first.
Comment 8 Eric Seidel (no email) 2012-01-05 10:41:10 PST
I see.  Looks like the mac port does:
http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/layout_tests/port/mac.py#L160

But the Apple base class does not:
http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/layout_tests/port/apple.py

That's probably right, since we have to pass specific args to run-safari for Mac.  Sounds like Win should just ovveride like Mac does.
Comment 9 Adam Roben (:aroben) 2012-01-05 11:36:55 PST
Created attachment 121305 [details]
Teach NRWT to use run-safari to open results.html on Apple's Windows port
Comment 10 Eric Seidel (no email) 2012-01-05 11:39:40 PST
Comment on attachment 121305 [details]
Teach NRWT to use run-safari to open results.html on Apple's Windows port

LGTM.
Comment 11 Adam Roben (:aroben) 2012-01-05 11:56:16 PST
Committed r104191: <http://trac.webkit.org/changeset/104191>