Bug 1201963 - Give a better warning when no tests can be found in the specified path r=jgraham
authorWes Kocher <wkocher@mozilla.com>
Thu, 03 Jan 2019 11:10:26 +0000
changeset 509493 13d9e2a48dbb3cc3d4e8a58a918a1cef129156d3
parent 509492 1fd51b59372d5a5455fc4ecf2cc208e8ca254898
child 509494 901e7ee24162e24177bf92b89988ac25f8534b6e
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1201963
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1201963 - Give a better warning when no tests can be found in the specified path r=jgraham Differential Revision: https://phabricator.services.mozilla.com/D15312
testing/web-platform/tests/tools/wptrunner/wptrunner/wptrunner.py
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/wptrunner.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/wptrunner.py
@@ -167,16 +167,22 @@ def run_tests(config, test_paths, produc
             test_source_kwargs["depth"] = kwargs["run_by_dir"]
 
         logger.info("Using %i client processes" % kwargs["processes"])
 
         skipped_tests = 0
         test_total = 0
         unexpected_total = 0
 
+        if len(test_loader.test_ids) == 0:
+            logger.error("Unable to find any tests at the path(s):")
+            for path in kwargs["test_list"]:
+                logger.error("  %s" % path)
+            logger.error("Please check spelling and make sure there are tests in the specified path(s).")
+            return False
         kwargs["pause_after_test"] = get_pause_after_test(test_loader, **kwargs)
 
         ssl_config = {"type": kwargs["ssl_type"],
                       "openssl": {"openssl_binary": kwargs["openssl_binary"]},
                       "pregenerated": {"host_key_path": kwargs["host_key_path"],
                                        "host_cert_path": kwargs["host_cert_path"],
                                        "ca_cert_path": kwargs["ca_cert_path"]}}