Add --ion-tbpl flag to jit-tests, fix Ion tests on tinderbox (bug 705191, r=dvander)
authorJan de Mooij <jdemooij@mozilla.com>
Mon, 28 Nov 2011 21:01:23 +0100
changeset 81244 18aacf4a410e64f8c888eccd33f7251b904ba771
parent 81243 f3068b10487b4581bef52096438e8f67c3e27f14
child 81245 4754cf8753c2935af9d2c70b47a26eadbee40f9f
push id318
push userjandemooij@gmail.com
push dateMon, 28 Nov 2011 20:03:09 +0000
reviewersdvander
bugs705191
milestone11.0a1
Add --ion-tbpl flag to jit-tests, fix Ion tests on tinderbox (bug 705191, r=dvander)
js/src/Makefile.in
js/src/jit-test/jit_test.py
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -709,17 +709,17 @@ ifneq ($(OS_ARCH),WINNT) # FIXME: this s
 endif
 
 JITFLAGS = ,m,am,amd,n,mn,amn,amdn,mdn
 check-jit-test::
 	$(wildcard $(RUN_TEST_PROGRAM)) $(PYTHON) -u $(srcdir)/jit-test/jit_test.py \
 	        --valgrind --no-slow --no-progress --tinderbox --jitflags=$(JITFLAGS) $(DIST)/bin/js$(BIN_SUFFIX)
 check-ion-test::
 	$(wildcard $(RUN_TEST_PROGRAM)) $(PYTHON) -u $(srcdir)/jit-test/jit_test.py \
-	        --valgrind --no-slow --no-progress --tinderbox --ion $(DIST)/bin/js$(BIN_SUFFIX)
+	        --valgrind --no-slow --no-progress --tinderbox --ion-tbpl $(DIST)/bin/js$(BIN_SUFFIX)
 
 check:: check-jit-test check-ion-test
 
 # jstests doesn't have a --jitflags option, so we need to loop, updating the
 # exit code (RC) after each invocation.
 # FIXME: MethodJIT doesn't work for 1 test case (bug 644393), so
 # --no-extensions is set to skip that test. Remove as soon as possible.
 check-jstests:
--- a/js/src/jit-test/jit_test.py
+++ b/js/src/jit-test/jit_test.py
@@ -423,17 +423,19 @@ def main(argv):
                   help='Run all tests with valgrind, if valgrind is in $PATH.')
     op.add_option('--jitflags', dest='jitflags', default='m,mn',
                   help='Example: --jitflags=m,mn to run each test with -m, -m -n [default=%default]')
     op.add_option('--avoid-stdio', dest='avoid_stdio', action='store_true',
                   help='Use js-shell file indirection instead of piping stdio.')
     op.add_option('--write-failure-output', dest='write_failure_output', action='store_true',
                   help='With --write-failures=FILE, additionally write the output of failed tests to [FILE]')
     op.add_option('--ion', dest='ion', action='store_true',
-                  help='Test all IonMonkey options')
+                  help='Run tests with --ion flag (ignores --jitflags)')
+    op.add_option('--ion-tbpl', dest='ion_tbpl', action='store_true',
+                  help='Run tests with all IonMonkey option combinations (ignores --jitflags)')
     (OPTIONS, args) = op.parse_args(argv)
     if len(args) < 1:
         op.error('missing JS_SHELL argument')
     # We need to make sure we are using backslashes on Windows.
     JS, test_args = os.path.normpath(args[0]), args[1:]
     JS = os.path.realpath(JS) # Burst through the symlinks!
 
     if stdio_might_be_broken():
@@ -489,38 +491,45 @@ def main(argv):
 
     test_list = [ Test.from_file(_, OPTIONS) for _ in test_list ]
 
     if not OPTIONS.run_slow:
         test_list = [ _ for _ in test_list if not _.slow ]
 
     # The full test list is ready. Now create copies for each JIT configuration.
     job_list = []
-    if OPTIONS.jitflags:
-        jitflags_list = parse_jitflags()
-        for test in test_list:
-            for jitflags in jitflags_list:
-                new_test = test.copy()
-                new_test.jitflags.extend(jitflags)
-                job_list.append(new_test)
-    else:
+    if OPTIONS.ion_tbpl:
+        # Run tests with --ion and all combinations of ion_flags.
         ion_flags = [ '--ion-eager',
                       '--ion-regalloc=greedy',
                       '--ion-gvn=off',
                       '--ion-licm=off',
                       '--ion-inlining=off' ]
         for test in test_list:
             for i in range(0, 2 ** len(ion_flags)):
                 args = ['--ion']
                 for j in range(0, len(ion_flags)):
                     if i & (1 << j):
                         args.append(ion_flags[j])
                 new_test = test.copy()
                 new_test.jitflags.extend(args)
                 job_list.append(new_test)
+    elif OPTIONS.ion:
+        args = ['--ion']
+        for test in test_list:
+            new_test = test.copy()
+            new_test.jitflags.extend(args)
+            job_list.append(new_test)
+    else:
+        jitflags_list = parse_jitflags()
+        for test in test_list:
+            for jitflags in jitflags_list:
+                new_test = test.copy()
+                new_test.jitflags.extend(jitflags)
+                job_list.append(new_test)
 
     shell_args = shlex.split(OPTIONS.shell_args)
 
     if OPTIONS.debug:
         if len(job_list) > 1:
             print('Multiple tests match command line arguments, debugger can only run one')
             for tc in job_list:
                 print('    %s'%tc.path)