Bug 1157354 - Part 1: Add --tbpl-debug option to jstests.py. r=sfink
authorTooru Fujisawa <arai_a@mac.com>
Tue, 05 May 2015 13:59:51 +0900
changeset 242336 561c7f79f2a59183b7bc00b4c85d45f9a31f0cc6
parent 242335 e0a9638176712156c4aa73cc00512969c8c02198
child 242337 54333627915b2bf94331c86dd68486bb2340c90d
push id28689
push usercbook@mozilla.com
push dateTue, 05 May 2015 10:05:09 +0000
treeherdermozilla-central@754579ec0e68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1157354
milestone40.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 1157354 - Part 1: Add --tbpl-debug option to jstests.py. r=sfink
js/src/tests/jstests.py
js/src/tests/lib/tests.py
--- a/js/src/tests/jstests.py
+++ b/js/src/tests/jstests.py
@@ -8,17 +8,17 @@ See the adjacent README.txt for more det
 from __future__ import print_function
 
 import os, sys, textwrap
 from os.path import abspath, dirname, isfile, realpath
 from copy import copy
 from subprocess import list2cmdline, call
 
 from lib.results import NullTestOutput
-from lib.tests import TestCase, TBPL_FLAGS
+from lib.tests import TestCase, TBPL_FLAGS, TBPL_DEBUG_FLAGS
 from lib.results import ResultsSink
 from lib.progressbar import ProgressBar
 
 if sys.platform.startswith('linux') or sys.platform.startswith('darwin'):
     from lib.tasks_unix import run_all_tests
 else:
     from lib.tasks_win import run_all_tests
 
@@ -92,16 +92,19 @@ def parse_args():
                           ' (in seconds).')
     harness_og.add_option('-a', '--args', dest='shell_args', default='',
                           help='Extra args to pass to the JS shell.')
     harness_og.add_option('--jitflags', default='',
                           help="Obsolete. Does nothing.")
     harness_og.add_option('--tbpl', action='store_true',
                           help='Runs each test in all configurations tbpl'
                           ' tests.')
+    harness_og.add_option('--tbpl-debug', action='store_true',
+                          help='Runs each test in some faster configurations'
+                          ' tbpl tests.')
     harness_og.add_option('-g', '--debug', action='store_true',
                           help='Run a test in debugger.')
     harness_og.add_option('--debugger', default='gdb -q --args',
                           help='Debugger command.')
     harness_og.add_option('-J', '--jorendb', action='store_true',
                           help='Run under JS debugger.')
     harness_og.add_option('--passthrough', action='store_true',
                           help='Run tests with stdin/stdout attached to'
@@ -264,19 +267,19 @@ def load_tests(options, requested_paths,
                               xul_tester)
     skip_list = []
 
     if options.make_manifests:
         manifest.make_manifests(options.make_manifests, test_list)
         sys.exit()
 
     # Create a new test list. Apply each TBPL configuration to every test.
-    if options.tbpl:
+    if options.tbpl or options.tbpl_debug:
         new_test_list = []
-        flags_list = TBPL_FLAGS
+        flags_list = TBPL_FLAGS if options.tbpl else TBPL_DEBUG_FLAGS
         for test in test_list:
             for jitflags in flags_list:
                 tmp_test = copy(test)
                 tmp_test.jitflags = copy(test.jitflags)
                 tmp_test.jitflags.extend(jitflags)
                 new_test_list.append(tmp_test)
         test_list = new_test_list
 
--- a/js/src/tests/lib/tests.py
+++ b/js/src/tests/lib/tests.py
@@ -15,16 +15,22 @@ TBPL_FLAGS = [
     [], # no flags, normal baseline and ion
     ['--ion-eager', '--ion-offthread-compile=off'], # implies --baseline-eager
     ['--ion-eager', '--ion-offthread-compile=off',
      '--ion-check-range-analysis', '--ion-extra-checks', '--no-sse3', '--no-threads'],
     ['--baseline-eager'],
     ['--baseline-eager', '--no-fpu'],
     ['--no-baseline', '--no-ion'],
 ]
+# Run reduced variants on debug builds, since they take longer time.
+TBPL_DEBUG_FLAGS = [
+    [], # no flags, normal baseline and ion
+    ['--ion-eager', '--ion-offthread-compile=off'], # implies --baseline-eager
+    ['--baseline-eager'],
+]
 
 def do_run_cmd(cmd):
     l = [None, None]
     th_run_cmd(cmd, l)
     return l[1]
 
 def set_limits():
     # resource module not supported on all platforms