2011-01-18 Dirk Pranke <dpranke@chromium.org>
[WebKit.git] / Tools / Scripts / webkitpy / layout_tests / layout_package / test_runner.py
index 5b02a006d98c50424fb577499b9103868899959a..2f63ec872a1118aa6a60ff4197c45b629931d813 100644 (file)
@@ -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):