Title: [182018] trunk/Tools
- Revision
- 182018
- Author
- [email protected]
- Date
- 2015-03-26 11:16:02 -0700 (Thu, 26 Mar 2015)
Log Message
Add --allowed-host support to run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=142938
Reviewed by Brent Fulgham.
Accept --allowed-host arguments from run-webkit-tests and pass them through to
DumpRenderTree and WebKitTestRunner.
Drive-by fix: Depending on the value of the --layout-test-dir parameter, layout test results
are placed in the wrong location. The argument is compared with each tests's path, and if a
relative path or a path with '..' was used, results are placed alongside the test. Take the
absolute path of the --layout-test-dir argument, collapsing path components like '..'.
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
* Scripts/webkitpy/port/base.py:
(Port.__init__):
(Port.allowed_hosts):
* Scripts/webkitpy/port/driver.py:
(Driver.cmd_line):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (182017 => 182018)
--- trunk/Tools/ChangeLog 2015-03-26 18:12:56 UTC (rev 182017)
+++ trunk/Tools/ChangeLog 2015-03-26 18:16:02 UTC (rev 182018)
@@ -1,5 +1,28 @@
2015-03-26 Jer Noble <[email protected]>
+ Add --allowed-host support to run-webkit-tests
+ https://bugs.webkit.org/show_bug.cgi?id=142938
+
+ Reviewed by Brent Fulgham.
+
+ Accept --allowed-host arguments from run-webkit-tests and pass them through to
+ DumpRenderTree and WebKitTestRunner.
+
+ Drive-by fix: Depending on the value of the --layout-test-dir parameter, layout test results
+ are placed in the wrong location. The argument is compared with each tests's path, and if a
+ relative path or a path with '..' was used, results are placed alongside the test. Take the
+ absolute path of the --layout-test-dir argument, collapsing path components like '..'.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (parse_args):
+ * Scripts/webkitpy/port/base.py:
+ (Port.__init__):
+ (Port.allowed_hosts):
+ * Scripts/webkitpy/port/driver.py:
+ (Driver.cmd_line):
+
+2015-03-26 Jer Noble <[email protected]>
+
[Mac] Add an --allowed-host argument to DRT and WKTR to allow tests to connect to non-localhost servers
https://bugs.webkit.org/show_bug.cgi?id=142931
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (182017 => 182018)
--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2015-03-26 18:12:56 UTC (rev 182017)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2015-03-26 18:16:02 UTC (rev 182018)
@@ -320,6 +320,8 @@
help=("The name of an additional subversion or git checkout")),
optparse.make_option("--additional-repository-path",
help=("The path to an additional subversion or git checkout (requires --additional-repository-name)")),
+ optparse.make_option("--allowed-host", type="string", action="" default=[],
+ help=("If specified, tests are allowed to make requests to the specified hostname."))
]))
option_parser = optparse.OptionParser()
Modified: trunk/Tools/Scripts/webkitpy/port/base.py (182017 => 182018)
--- trunk/Tools/Scripts/webkitpy/port/base.py 2015-03-26 18:12:56 UTC (rev 182017)
+++ trunk/Tools/Scripts/webkitpy/port/base.py 2015-03-26 18:16:02 UTC (rev 182018)
@@ -138,7 +138,7 @@
self._results_directory = None
self._root_was_set = hasattr(options, 'root') and options.root
self._jhbuild_wrapper = []
- self._layout_tests_dir = hasattr(options, 'layout_tests_dir') and options.layout_tests_dir
+ self._layout_tests_dir = hasattr(options, 'layout_tests_dir') and options.layout_tests_dir and self._filesystem.abspath(options.layout_tests_dir)
def architecture(self):
return self.get_option('architecture')
@@ -1047,6 +1047,8 @@
repository_paths += [(self._options.additional_repository_name, self._options.additional_repository_path)]
return repository_paths
+ def allowed_hosts(self):
+ return self.get_option("allowed_host", [])
def default_configuration(self):
return self._config.default_configuration()
Modified: trunk/Tools/Scripts/webkitpy/port/driver.py (182017 => 182018)
--- trunk/Tools/Scripts/webkitpy/port/driver.py 2015-03-26 18:12:56 UTC (rev 182017)
+++ trunk/Tools/Scripts/webkitpy/port/driver.py 2015-03-26 18:16:02 UTC (rev 182018)
@@ -370,6 +370,10 @@
if self._no_timeout:
cmd.append('--no-timeout')
+ for allowed_host in self._port.allowed_hosts():
+ cmd.append('--allowed-host')
+ cmd.append(allowed_host)
+
cmd.extend(self._port.get_option('additional_drt_flag', []))
cmd.extend(self._port.additional_drt_flag())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes