Bug 1163020 - Fix --jitflags=none or no --jitflags in jit_test.py. r=terrence, a=test-only
authorTooru Fujisawa <arai_a@mac.com>
Sat, 09 May 2015 01:13:00 +0900
changeset 265944 d7313d188c2f66a03c4e76633a2f8244c5480081
parent 265943 ec9034177df2a6df7cf4c34f0f675bfeb012c210
child 265945 31c6d3beb9be541ff885144e167484f80e77fc2b
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence, test-only
bugs1163020
milestone39.0a2
Bug 1163020 - Fix --jitflags=none or no --jitflags in jit_test.py. r=terrence, a=test-only
js/src/tests/jstests.py
js/src/tests/lib/tests.py
--- a/js/src/tests/jstests.py
+++ b/js/src/tests/jstests.py
@@ -275,17 +275,17 @@ def load_tests(options, requested_paths,
 
     # Create a new test list. Apply each TBPL configuration to every test.
     flags_list = None
     if options.tbpl:
         flags_list = get_jitflags('all')
     elif options.tbpl_debug:
         flags_list = get_jitflags('debug')
     else:
-        flags_list = get_jitflags(options.jitflags)
+        flags_list = get_jitflags(options.jitflags, none=None)
 
     if flags_list:
         new_test_list = []
         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)
--- a/js/src/tests/lib/tests.py
+++ b/js/src/tests/lib/tests.py
@@ -27,23 +27,27 @@ JITFLAGS = {
         ['--ion-eager', '--ion-offthread-compile=off']
     ],
     # Run reduced variants on debug builds, since they take longer time.
     'debug': [
         [], # no flags, normal baseline and ion
         ['--ion-eager', '--ion-offthread-compile=off'], # implies --baseline-eager
         ['--baseline-eager'],
     ],
-    'none': []
+    'none': [
+        [] # no flags, normal baseline and ion
+    ]
 }
 
-def get_jitflags(variant):
+def get_jitflags(variant, **kwargs):
     if variant not in JITFLAGS:
         print('Invalid jitflag: "{}"'.format(variant))
         sys.exit(1)
+    if variant == 'none' and 'none' in kwargs:
+        return kwargs['none']
     return JITFLAGS[variant]
 
 def do_run_cmd(cmd):
     l = [None, None]
     th_run_cmd(cmd, l)
     return l[1]
 
 def set_limits():