diff options
| -rwxr-xr-x | test/run-test | 5 | ||||
| -rwxr-xr-x | test/testrunner/testrunner.py | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/test/run-test b/test/run-test index e6196a0213..9996986a92 100755 --- a/test/run-test +++ b/test/run-test @@ -407,6 +407,10 @@ while true; do elif [ "x$1" = "x--random-profile" ]; then run_args="${run_args} --random-profile" shift + elif [ "x$1" = "x--dex2oat-jobs" ]; then + shift + run_args="${run_args} -Xcompiler-option -j$1" + shift elif expr "x$1" : "x--" >/dev/null 2>&1; then echo "unknown $0 option: $1" 1>&2 usage="yes" @@ -702,6 +706,7 @@ if [ "$usage" = "yes" ]; then echo " --bisection-search Perform bisection bug search." echo " --vdex Test using vdex as in input to dex2oat. Only works with --prebuild." echo " --suspend-timeout Change thread suspend timeout ms (default 500000)." + echo " --dex2oat-jobs Number of dex2oat jobs." ) 1>&2 # Direct to stderr so usage is not printed if --quiet is set. exit 1 fi diff --git a/test/testrunner/testrunner.py b/test/testrunner/testrunner.py index 68e1856adb..f425097b57 100755 --- a/test/testrunner/testrunner.py +++ b/test/testrunner/testrunner.py @@ -127,6 +127,7 @@ build = False gdb = False gdb_arg = '' stop_testrunner = False +dex2oat_jobs = -1 # -1 corresponds to default threads for dex2oat def gather_test_info(): """The method gathers test information about the test to be run which includes @@ -341,6 +342,9 @@ def run_tests(tests): if gdb_arg: options_all += ' --gdb-arg ' + gdb_arg + if dex2oat_jobs != -1: + options_all += ' --dex2oat-jobs ' + str(dex2oat_jobs) + config = itertools.product(tests, TARGET_TYPES, RUN_TYPES, PREBUILD_TYPES, COMPILER_TYPES, RELOCATE_TYPES, TRACE_TYPES, GC_TYPES, JNI_TYPES, IMAGE_TYPES, PICTEST_TYPES, @@ -860,6 +864,7 @@ def parse_option(): global gdb global gdb_arg global timeout + global dex2oat_jobs parser = argparse.ArgumentParser(description="Runs all or a subset of the ART test suite.") parser.add_argument('-t', '--test', dest='test', help='name of the test') @@ -887,6 +892,8 @@ def parse_option(): parser.set_defaults(build = env.ART_TEST_RUN_TEST_BUILD) parser.add_argument('--gdb', action='store_true', dest='gdb') parser.add_argument('--gdb-arg', dest='gdb_arg') + parser.add_argument('--dex2oat-jobs', type=int, dest='dex2oat_jobs', + help='Number of dex2oat jobs') options = vars(parser.parse_args()) if options['build_target']: @@ -987,6 +994,8 @@ def parse_option(): if options['gdb_arg']: gdb_arg = options['gdb_arg'] timeout = options['timeout'] + if options['dex2oat_jobs']: + dex2oat_jobs = options['dex2oat_jobs'] return test |