Bug 151542 - run-webkit-tests: http server for imported W3C tests doesn't work with --layout-tests-directory switch
Summary: run-webkit-tests: http server for imported W3C tests doesn't work with --layo...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-22 02:43 PST by David Kilzer (:ddkilzer)
Modified: 2015-11-22 20:03 PST (History)
8 users (show)

See Also:


Attachments
Patch v1 (7.20 KB, patch)
2015-11-22 02:55 PST, David Kilzer (:ddkilzer)
dbates: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2015-11-22 02:43:35 PST
When invoking run-webkit-tests with the --layout-tests-directory command-line switch, the http server for the imported W3C tests ignores that path and instead creates a path relative to the Tools directory from which it is invoked.

That causes a problem when the WebKit working directory for Tools is sparse (just the Tools directory has been checked out), and the LayoutTests directory is also sparse.

As it turns out, it's pretty easy to fix, and it removes an argument from the WebPlatformTestServer constructor.
Comment 1 David Kilzer (:ddkilzer) 2015-11-22 02:55:56 PST
Created attachment 266052 [details]
Patch v1
Comment 2 youenn fablet 2015-11-22 11:20:24 PST
Comment on attachment 266052 [details]
Patch v1

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

> Tools/Scripts/webkitpy/layout_tests/servers/web_platform_test_server_unittest.py:59
> +        options.ensure_value("layout_tests_dir", "/mock-checkout/LayoutTests")

Would this test work without this option?
Would it be good to have an additional test dedicated to a non-default layout_tests_dir value?
Comment 3 Daniel Bates 2015-11-22 12:33:03 PST
Comment on attachment 266052 [details]
Patch v1

This looks sane to me. I did not mark this cq+ to give you a chance to reply to Youenn Fablet and/or amend the patch.
Comment 4 David Kilzer (:ddkilzer) 2015-11-22 19:44:05 PST
(In reply to comment #2)
> Comment on attachment 266052 [details]
> Patch v1
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=266052&action=review
> 
> > Tools/Scripts/webkitpy/layout_tests/servers/web_platform_test_server_unittest.py:59
> > +        options.ensure_value("layout_tests_dir", "/mock-checkout/LayoutTests")
> 
> Would this test work without this option?

Good question!  The existing tests do work without this, so I removed it.

> Would it be good to have an additional test dedicated to a non-default
> layout_tests_dir value?

And I added a test that requires that layout_tests_dir be set.

Thanks!
Comment 5 David Kilzer (:ddkilzer) 2015-11-22 20:03:50 PST
Committed r192738: <http://trac.webkit.org/changeset/192738>