Bug 791759 - Fix jit-tests default jitflags. r=dmandelin
authorTill Schneidereit <tschneidereit@gmail.com>
Wed, 21 Nov 2012 02:53:27 +0100
changeset 113860 b71748955cf35fa864c53d1409e7e0213238bc5d
parent 113859 0a2f6ef08f64ceeeab2b07517f26666e1c529ef0
child 113861 fa74a5dfd0ca39f5c03fff3e51066bc2e387bb06
push id18421
push usertschneidereit@gmail.com
push dateWed, 21 Nov 2012 01:56:07 +0000
treeherdermozilla-inbound@b71748955cf3 [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 791759 - Fix jit-tests default jitflags. r=dmandelin
--- a/js/src/jit-test/README
+++ b/js/src/jit-test/README
@@ -48,33 +48,36 @@ test is run. For example:
 The general format in EBNF is:
     metaline  ::= cookie { item ";" }
     cookie    ::= "|jit-test|"
     item      ::= flag | attribute
     flag      ::= "slow" | "allow-oom" | "valgrind" | "tz-pacific" |
-                  "mjitalways" | "debug" |
+                  "mjit" | "mjitalways" | "ion-eager" | "debug" |
+                  "dump-bytecode" |
     attribute ::= name ":" value
     name      ::= "error" | "exitstatus"
     value     ::= <string>
 The metaline may appear anywhere in the first line of the file: this allows it
 to be placed inside any kind of comment.
 The meaning of the items:
     slow         Test runs slowly. Do not run if the --no-slow option is given.
     allow-oom    If the test runs out of memory, it counts as passing.
     valgrind     Run test under valgrind.
     tz-pacific   Always run test with the Pacific time zone (TZ=PST8PDT).
+    mjit         Run js with -m, whether --jitflags says to or not
     mjitalways   Run js with -a, whether --jitflags says to or not
+    ion-eager    Run js with --ion-eager, whether --jitflags says to or not
     debug        Run js with -d, whether --jitflags says to or not
     dump-bytecode Run js with -D, whether --jitflags says to or not
     error        The test should be considered to pass iff it throws the
                  given JS exception.
     exitstatus   The test should exit with the given status value (an integer).
 * END
--- a/js/src/jit-test/jit_test.py
+++ b/js/src/jit-test/jit_test.py
@@ -44,17 +44,17 @@ def _relpath(path, start=None):
         return os.curdir
     return os.path.join(*rel_list)
 os.path.relpath = _relpath
 class Test:
     def __init__(self, path):
         self.path = path       # path to test file
         self.jitflags = []     # jit flags to enable
         self.slow = False      # True means the test is slow-running
         self.allow_oom = False # True means that OOM is not considered a failure
         self.valgrind = False  # True means run under valgrind
         self.tz_pacific = False # True means force Pacific time for the test
         self.expect_error = '' # Errors to expect and consider passing
         self.expect_status = 0 # Exit status to expect from shell
@@ -199,17 +199,17 @@ def run_timeout_cmd(cmdline, options, ti
     return (out, err, code, timed_out)
 def run_cmd(cmdline, env, timeout):
     return run_timeout_cmd(cmdline, { 'env': env }, timeout)
 def run_cmd_avoid_stdio(cmdline, env, timeout):
     stdoutPath, stderrPath = tmppath('jsstdout'), tmppath('jsstderr')
     env['JS_STDOUT'] = stdoutPath
-    env['JS_STDERR'] = stderrPath       
+    env['JS_STDERR'] = stderrPath
     _, __, code = run_timeout_cmd(cmdline, { 'env': env }, timeout)
     return read_and_unlink(stdoutPath), read_and_unlink(stderrPath), code
 def run_test(test, lib_dir, shell_args):
     cmd = get_test_cmd(test.path, test.jitflags, lib_dir, shell_args)
     if (test.valgrind and
         any([os.path.exists(os.path.join(d, 'valgrind'))
@@ -357,17 +357,17 @@ def run_tests(tests, test_dir, lib_dir, 
         return False
         print('PASSED ALL' + ('' if complete else ' (partial run -- interrupted by user %s)'%doing))
         return True
 def parse_jitflags():
-    jitflags = [ [ '-' + flag for flag in flags ] 
+    jitflags = [ [ '-' + flag for flag in flags ]
                  for flags in OPTIONS.jitflags.split(',') ]
     for flags in jitflags:
         for flag in flags:
             if flag not in ('-m', '-a', '-p', '-d', '-n'):
                 print('Invalid jit flag: "%s"'%flag)
     return jitflags
@@ -397,17 +397,17 @@ def main(argv):
     # The [TESTS] optional arguments are paths of test files relative
     # to the jit-test/tests directory.
     from optparse import OptionParser
     op = OptionParser(usage='%prog [options] JS_SHELL [TESTS]')
     op.add_option('-s', '--show-cmd', dest='show_cmd', action='store_true',
                   help='show js shell command run')
-    op.add_option('-f', '--show-failed-cmd', dest='show_failed', 
+    op.add_option('-f', '--show-failed-cmd', dest='show_failed',
                   action='store_true', help='show command lines of failed tests')
     op.add_option('-o', '--show-output', dest='show_output', action='store_true',
                   help='show output from js shell')
     op.add_option('-x', '--exclude', dest='exclude', action='append',
                   help='exclude given test dir or path')
     op.add_option('--no-slow', dest='run_slow', action='store_false',
                   help='do not run tests marked as slow')
     op.add_option('-t', '--timeout', dest='timeout',  type=float, default=150.0,
@@ -425,18 +425,19 @@ def main(argv):
     op.add_option('-R', '--retest', dest='retest', metavar='FILE',
                   help='Retest using test list file [FILE]')
     op.add_option('-g', '--debug', dest='debug', action='store_true',
                   help='Run test in gdb')
     op.add_option('--valgrind', dest='valgrind', action='store_true',
                   help='Enable the |valgrind| flag, if valgrind is in $PATH.')
     op.add_option('--valgrind-all', dest='valgrind_all', action='store_true',
                   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('--jitflags', dest='jitflags', default='',
+                  help='Example: --jitflags=m,mn to run each test with "-m" and "-m -n" [default="%default"]. ' +
+                       'Long flags, such as "--no-jm", should be set using --args.')
     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='Run tests with --ion flag (ignores --jitflags)')
     op.add_option('--tbpl', dest='tbpl', action='store_true',
                   help='Run tests with all IonMonkey option combinations (ignores --jitflags)')