Bug 1515039 - Running jstests is extremely slow. r=jandem
authorJason Orendorff <jorendorff@mozilla.com>
Sat, 12 Jan 2019 10:40:21 +0000
changeset 510926 d945f4dd088b236c7cd44a54b443954952e41f27
parent 510925 60668e84331f40ff3185d658a33d91ae89fa2dad
child 510927 c15b18fe44c403e5d3c88fdf2192eea5e4d26b3e
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)
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 1515039 - Running jstests is extremely slow. r=jandem Differential Revision: https://phabricator.services.mozilla.com/D16210
--- a/js/src/tests/jstests.py
+++ b/js/src/tests/jstests.py
@@ -150,16 +150,22 @@ def parse_args():
                           help='Run tests to check output for different jit-flags')
     input_og = OptionGroup(op, "Inputs", "Change what tests are run.")
     input_og.add_option('-f', '--file', dest='test_file', action='append',
                         help='Get tests from the given file.')
     input_og.add_option('-x', '--exclude-file', action='append',
                         help='Exclude tests from the given file.')
+    input_og.add_option('--wpt', dest='wpt',
+                        type='choice',
+                        choices=['enabled', 'disabled', 'if-running-everything'],
+                        default='if-running-everything',
+                        help="Enable or disable shell web-platform-tests "
+                        "(default: enable if no test paths are specified).")
     input_og.add_option('--include', action='append', dest='requested_paths', default=[],
                         help='Include the given test file or directory.')
     input_og.add_option('--exclude', action='append', dest='excluded_paths', default=[],
                         help='Exclude the given test file or directory.')
     input_og.add_option('-d', '--exclude-random', dest='random',
                         help='Exclude tests marked as "random."')
     input_og.add_option('--run-skipped', action='store_true',
@@ -429,17 +435,21 @@ def load_tests(options, requested_paths,
         xul_tester = manifest.XULInfoTester(xul_info, options.js_shell)
     test_dir = dirname(abspath(__file__))
     path_options = PathOptions(test_dir, requested_paths, excluded_paths)
     test_count = manifest.count_tests(test_dir, path_options)
     test_gen = manifest.load_reftests(test_dir, path_options, xul_tester)
     # WPT tests are already run in the browser in their own harness.
-    if not options.make_manifests:
+    wpt_enabled = (options.wpt == 'enabled' or
+                   (options.wpt == 'if-running-everything' and
+                    len(requested_paths) == 0 and
+                    not options.make_manifests))
+    if wpt_enabled:
         wpt_tests = load_wpt_tests(xul_tester,
         test_count += len(wpt_tests)
         test_gen = chain(test_gen, wpt_tests)
     if options.test_reflect_stringify is not None:
         def trs_gen(tests):