[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
dpranke at chromium.org
dpranke at chromium.org
Sun Feb 20 23:11:16 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit aa6634606fb3fc5270a6e074b76daca849d9c536
Author: dpranke at chromium.org <dpranke at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jan 18 20:32:22 2011 +0000
2011-01-18 Dirk Pranke <dpranke at chromium.org>
Reviewed by Mihai Parparita.
new-run-webkit-tests shouldn't crash when you try to run a
directory containing only skipped files.
https://bugs.webkit.org/show_bug.cgi?id=52478
* Scripts/webkitpy/layout_tests/layout_package/test_runner.py:
* Scripts/webkitpy/layout_tests/port/test.py:
* Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index fd18ba0..2a97e83 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-18 Dirk Pranke <dpranke at chromium.org>
+
+ Reviewed by Mihai Parparita.
+
+ new-run-webkit-tests shouldn't crash when you try to run a
+ directory containing only skipped files.
+
+ https://bugs.webkit.org/show_bug.cgi?id=52478
+
+ * Scripts/webkitpy/layout_tests/layout_package/test_runner.py:
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
2011-01-18 Adam Bergkvist <adam.bergkvist at ericsson.com> and Martin Robinson <mrobinson at igalia.com>
Reviewed by Gustavo Noronha Silva.
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py
index 5b02a00..2f63ec8 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py
@@ -199,12 +199,15 @@ class TestRunner:
last_unexpected_results: list of unexpected results to retest, if any
"""
- paths = [self._strip_test_dir_prefix(arg) for arg in args if arg and arg != '']
+ paths = self._strip_test_dir_prefixes(args)
paths += last_unexpected_results
if self._options.test_list:
- paths += read_test_files(self._options.test_list)
+ paths += self._strip_test_dir_prefixes(read_test_files(self._options.test_list))
self._test_files = self._port.tests(paths)
+ def _strip_test_dir_prefixes(self, paths):
+ return [self._strip_test_dir_prefix(path) for path in paths if path]
+
def _strip_test_dir_prefix(self, path):
if path.startswith(LAYOUT_TESTS_DIRECTORY):
return path[len(LAYOUT_TESTS_DIRECTORY):]
@@ -390,6 +393,11 @@ class TestRunner:
result_summary.add(result, expected=True)
self._printer.print_expected('')
+ # Check to make sure we didn't filter out all of the tests.
+ if not len(self._test_files):
+ _log.info("All tests are being skipped")
+ return None
+
return result_summary
def _get_dir_for_test_file(self, test_file):
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/test.py b/Tools/Scripts/webkitpy/layout_tests/port/test.py
index 935881c..c96466c 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/test.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/test.py
@@ -213,7 +213,7 @@ class TestPort(base.Port):
def layout_tests_dir(self):
return self.path_from_webkit_base('Tools', 'Scripts',
- 'webkitpy', 'layout_tests', 'data')
+ 'webkitpy', 'layout_tests', 'data', 'LayoutTests')
def path_isdir(self, path):
# Used by test_expectations.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
index 2bfac2f..af1c6e1 100644
--- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
@@ -315,6 +315,14 @@ class MainTest(unittest.TestCase):
tests_run = get_tests_run(['passes/text.html'], tests_included=True, flatten_batches=True)
self.assertEquals(['passes/text.html'], tests_run)
+ def test_single_file_with_prefix(self):
+ tests_run = get_tests_run(['LayoutTests/passes/text.html'], tests_included=True, flatten_batches=True)
+ self.assertEquals(['passes/text.html'], tests_run)
+
+ def test_single_skipped_file(self):
+ tests_run = get_tests_run(['failures/expected/keybaord.html'], tests_included=True, flatten_batches=True)
+ self.assertEquals([], tests_run)
+
def test_test_list(self):
filename = tempfile.mktemp()
tmpfile = file(filename, mode='w+')
@@ -328,6 +336,14 @@ class MainTest(unittest.TestCase):
self.assertEqual(res, -1)
self.assertFalse(err.empty())
+ def test_test_list_with_prefix(self):
+ filename = tempfile.mktemp()
+ tmpfile = file(filename, mode='w+')
+ tmpfile.write('LayoutTests/passes/text.html')
+ tmpfile.close()
+ tests_run = get_tests_run(['--test-list=%s' % filename], tests_included=True, flatten_batches=True)
+ self.assertEquals(['passes/text.html'], tests_run)
+
def test_unexpected_failures(self):
# Run tests including the unexpected failures.
self._url_opened = None
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list