servo: Merge #12484 - Temporary fix for mach test-{wpt, css} issue with wonky paths (from aravind-pg:mach); r=ConnorGBrewster
authorAravind Gollakota <aravindprasant@gmail.com>
Sun, 17 Jul 2016 19:42:10 -0700
changeset 339312 dfe1e28673f01967eb9156244a4acce2707fa2cc
parent 339311 e4d6e8f0dbc516b015993510a72dffe06e881c7f
child 339313 2de25a8b8e9996cd18083ad2e59f5bbcdfef90d5
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersConnorGBrewster
servo: Merge #12484 - Temporary fix for mach test-{wpt, css} issue with wonky paths (from aravind-pg:mach); r=ConnorGBrewster This is just a temporary fix to get `mach test-wpt`, `mach update-manifest` etc. working properly again. A proper fix will likely involve a proper refactoring of the `suite_for_test` function. <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12481 - [X] These changes have been tested to work locally r? @ConnorGBrewster cc @jdm <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: f5c60e8c5aec34a1a6ff6c61f1174a7c93158159
servo/python/servo/testing_commands.py
--- a/servo/python/servo/testing_commands.py
+++ b/servo/python/servo/testing_commands.py
@@ -349,17 +349,17 @@ class MachCommands(CommandBase):
     def run_test_list_or_dispatch(self, requested_paths, correct_suite, correct_function, **kwargs):
         if not requested_paths:
             return correct_function(**kwargs)
         else:
             # Paths specified on command line. Ensure they can be handled, re-dispatch otherwise.
             all_handled = True
             for test_path in requested_paths:
                 suite = self.suite_for_path(test_path)
-                if correct_suite != suite:
+                if suite is not None and correct_suite != suite:
                     all_handled = False
                     print("Warning: %s is not a %s test. Delegating to test-%s." % (test_path, correct_suite, suite))
             if all_handled:
                 return correct_function(**kwargs)
             else:
                 # Dispatch each test to the correct suite via test()
                 Registrar.dispatch("test", context=self.context, params=requested_paths)