Restrict number of testrunner jobs to be equal to # cpus.
If not explicitly provided, testrunner set the concurrency to the
number of available cpus.
Bug: 65822340
Test: ./art/test/testrunner/run_build_test_target.py art-forcecopy -j100
Change-Id: I9e1473e0739289e5307ae618f0fe6fe5debf720c
diff --git a/test/testrunner/run_build_test_target.py b/test/testrunner/run_build_test_target.py
index 49444d4..492b792 100755
--- a/test/testrunner/run_build_test_target.py
+++ b/test/testrunner/run_build_test_target.py
@@ -96,7 +96,9 @@
run_test_command = [os.path.join(env.ANDROID_BUILD_TOP,
'art/test/testrunner/testrunner.py')]
run_test_command += target.get('run-test', [])
- run_test_command += ['-j', str(n_threads)]
+ # Let testrunner compute concurrency based on #cpus.
+ # b/65822340
+ # run_test_command += ['-j', str(n_threads)]
run_test_command += ['-b']
run_test_command += ['--host']
run_test_command += ['--verbose']
diff --git a/test/testrunner/testrunner.py b/test/testrunner/testrunner.py
index 2a772ff..6c49b8c 100755
--- a/test/testrunner/testrunner.py
+++ b/test/testrunner/testrunner.py
@@ -237,6 +237,7 @@
n_thread = get_default_threads('target')
else:
n_thread = get_default_threads('host')
+ print_text("Concurrency: " + str(n_thread) + "\n")
global semaphore
semaphore = threading.Semaphore(n_thread)