Add art-linux-bionic-x64 target-config
This config can be used to run linux_bionic tests. Updated
run_build_test_target.py to support allowing fully custom build
instructions (Linux_Bionic cannot be built with a simple make
command).
Test: ./art/test/testrunner/run_build_test_target.py -j72 art-linux-bionic-x64
Bug: 118778408
Change-Id: I27d12c508407e318d31fc50e541f7d990118e7b6
diff --git a/test/testrunner/run_build_test_target.py b/test/testrunner/run_build_test_target.py
index 14287b0..b4a4ada 100755
--- a/test/testrunner/run_build_test_target.py
+++ b/test/testrunner/run_build_test_target.py
@@ -62,6 +62,18 @@
print(custom_env)
os.environ.update(custom_env)
+# build is just a binary/script that is directly executed to build any artifacts needed for the
+# test.
+if 'build' in target:
+ build_command = target.get('build').format(
+ ANDROID_BUILD_TOP = env.ANDROID_BUILD_TOP,
+ MAKE_OPTIONS='DX= -j{threads}'.format(threads = n_threads))
+ sys.stdout.write(str(build_command) + '\n')
+ sys.stdout.flush()
+ if subprocess.call(build_command.split()):
+ sys.exit(1)
+
+# make runs soong/kati to build the target listed in the entry.
if 'make' in target:
build_command = 'build/soong/soong_ui.bash --make-mode'
build_command += ' DX='
@@ -107,7 +119,8 @@
run_test_command += ['--host']
run_test_command += ['--dex2oat-jobs']
run_test_command += ['4']
- run_test_command += ['-b']
+ if '--no-build-dependencies' not in test_flags:
+ run_test_command += ['-b']
run_test_command += ['--verbose']
sys.stdout.write(str(run_test_command) + '\n')