From bf7d481e9a934f1baaf1778a82371eeecce80727 Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Sat, 9 May 2015 04:01:03 +0900 Subject: [PATCH] Bug 1163020 - Fix --jitflags=none or no --jitflags in jit_test.py. r=terrence --- js/src/tests/jstests.py | 2 +- js/src/tests/lib/tests.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/js/src/tests/jstests.py b/js/src/tests/jstests.py index f78df35d7bbc..49f033b44b8e 100755 --- a/js/src/tests/jstests.py +++ b/js/src/tests/jstests.py @@ -285,7 +285,7 @@ def load_tests(options, requested_paths, excluded_paths): 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 = [] diff --git a/js/src/tests/lib/tests.py b/js/src/tests/lib/tests.py index 38f3a8a1b492..f9e638347b20 100644 --- a/js/src/tests/lib/tests.py +++ b/js/src/tests/lib/tests.py @@ -32,13 +32,17 @@ JITFLAGS = { ['--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):