Title: [129285] trunk/Tools
- Revision
- 129285
- Author
- [email protected]
- Date
- 2012-09-21 18:00:30 -0700 (Fri, 21 Sep 2012)
Log Message
nrwt: don't require additional-platform-directory to be an abspath or live under LayoutTests
https://bugs.webkit.org/show_bug.cgi?id=97380
Reviewed by Ojan Vafai.
There doesn't seem to be a good reason for this restriction and
it's useful to be able to point to directories outside the
checkout for results (e.g., for local failures due to a 10.7.4
install ;).
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.relative_test_filename):
(Port.relative_perf_test_filename):
* Scripts/webkitpy/layout_tests/port/chromium_android.py:
(ChromiumAndroidDriver._command_from_driver_input):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(_set_up_derived_options):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(MainTest.test_additional_platform_directory):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (129284 => 129285)
--- trunk/Tools/ChangeLog 2012-09-22 01:00:01 UTC (rev 129284)
+++ trunk/Tools/ChangeLog 2012-09-22 01:00:30 UTC (rev 129285)
@@ -1,5 +1,27 @@
2012-09-21 Dirk Pranke <[email protected]>
+ nrwt: don't require additional-platform-directory to be an abspath or live under LayoutTests
+ https://bugs.webkit.org/show_bug.cgi?id=97380
+
+ Reviewed by Ojan Vafai.
+
+ There doesn't seem to be a good reason for this restriction and
+ it's useful to be able to point to directories outside the
+ checkout for results (e.g., for local failures due to a 10.7.4
+ install ;).
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.relative_test_filename):
+ (Port.relative_perf_test_filename):
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidDriver._command_from_driver_input):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (_set_up_derived_options):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (MainTest.test_additional_platform_directory):
+
+2012-09-21 Dirk Pranke <[email protected]>
+
webkitpy: drop support for old TestExpectations syntax
https://bugs.webkit.org/show_bug.cgi?id=97364
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py (129284 => 129285)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-09-22 01:00:01 UTC (rev 129284)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py 2012-09-22 01:00:30 UTC (rev 129285)
@@ -786,17 +786,20 @@
return self._filesystem.join(self._webkit_baseline_path(port_name), 'TestExpectations')
def relative_test_filename(self, filename):
- """Returns a test_name a realtive unix-style path for a filename under the LayoutTests
- directory. Filenames outside the LayoutTests directory should raise
- an error."""
+ """Returns a test_name a relative unix-style path for a filename under the LayoutTests
+ directory. Ports may legitimately return abspaths here if no relpath makes sense."""
# Ports that run on windows need to override this method to deal with
# filenames with backslashes in them.
- assert filename.startswith(self.layout_tests_dir()), "%s did not start with %s" % (filename, self.layout_tests_dir())
- return filename[len(self.layout_tests_dir()) + 1:]
+ if filename.startswith(self.layout_tests_dir()):
+ return self.host.filesystem.relpath(filename, self.layout_tests_dir())
+ else:
+ return self.filesystem.abspath(filename)
def relative_perf_test_filename(self, filename):
- assert filename.startswith(self.perf_tests_dir()), "%s did not start with %s" % (filename, self.perf_tests_dir())
- return filename[len(self.perf_tests_dir()) + 1:]
+ if filename.startswith(self.perf_tests_dir()):
+ return self.host.filesystem.relpath(filename, self.perf_tests_dir())
+ else:
+ return self.filesystem.abspath(filename)
@memoized
def abspath_for_test(self, test_name):
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py (129284 => 129285)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py 2012-09-22 01:00:01 UTC (rev 129284)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py 2012-09-22 01:00:30 UTC (rev 129285)
@@ -663,6 +663,7 @@
if command.startswith('/'):
# Convert the host file path to a device file path. See comment of
# DEVICE_LAYOUT_TESTS_DIR for details.
+ # FIXME: what happens if command lies outside of the layout_tests_dir on the host?
command = DEVICE_LAYOUT_TESTS_DIR + self._port.relative_test_filename(command)
return command
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (129284 => 129285)
--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2012-09-22 01:00:01 UTC (rev 129284)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2012-09-22 01:00:30 UTC (rev 129285)
@@ -142,13 +142,10 @@
options.slow_time_out_ms = str(5 * int(options.time_out_ms))
if options.additional_platform_directory:
- normalized_platform_directories = []
+ additional_platform_directories = []
for path in options.additional_platform_directory:
- if not port.host.filesystem.isabs(path):
- warnings.append("--additional-platform-directory=%s is ignored since it is not absolute" % path)
- continue
- normalized_platform_directories.append(port.host.filesystem.normpath(path))
- options.additional_platform_directory = normalized_platform_directories
+ additional_platform_directories.append(port.host.filesystem.abspath(path))
+ options.additional_platform_directory = additional_platform_directories
if not options.http and options.skipped in ('ignore', 'only'):
warnings.append("--force/--skipped=%s overrides --no-http." % (options.skipped))
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py (129284 => 129285)
--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py 2012-09-22 01:00:01 UTC (rev 129284)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py 2012-09-22 01:00:30 UTC (rev 129285)
@@ -851,10 +851,8 @@
self.assertTrue(passing_run(['--additional-platform-directory', '/tmp/foo']))
self.assertTrue(passing_run(['--additional-platform-directory', '/tmp/../foo']))
self.assertTrue(passing_run(['--additional-platform-directory', '/tmp/foo', '--additional-platform-directory', '/tmp/bar']))
+ self.assertTrue(passing_run(['--additional-platform-directory', 'foo']))
- res, buildbot_output, regular_output, user = logging_run(['--additional-platform-directory', 'foo'])
- self.assertContains(regular_output, '--additional-platform-directory=foo is ignored since it is not absolute\n')
-
def test_additional_expectations(self):
host = MockHost()
host.filesystem.write_text_file('/tmp/overrides.txt', 'Bug(x) failures/unexpected/mismatch.html [ ImageOnlyFailure ]\n')
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes