From 15ff34d6e8b3e8ba3f29a53ecd90439055d90964 Mon Sep 17 00:00:00 2001 From: Roland Levillain Date: Wed, 5 Feb 2020 19:55:34 +0000 Subject: Generate a linker configuration file for chroot-based ART testing. Build `/system/bin/linkerconfig` as part of ART chroot-based target testing builds, include it in sync'd files, and invoke it in `tools/buildbot-sync.sh` to generate a linker configuration file for the chroot environment. Adjust the linker configuration file path logic in `tools/buildbot-sync.sh` to match the one in top-of-tree Bionic linker code. Test: Run ART tests in a chroot environment on an Android R "host device" Test: Run ART tests in a chroot environment on an Android Q "host device" Bug: 34729697 Bug: 147737840 Bug: 148171362 Change-Id: I457d8c75988b6a9254b7ac9db3642f40f4271f1d --- tools/buildbot-setup-device.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tools/buildbot-setup-device.sh') diff --git a/tools/buildbot-setup-device.sh b/tools/buildbot-setup-device.sh index f2bf3299fb..31782095a6 100755 --- a/tools/buildbot-setup-device.sh +++ b/tools/buildbot-setup-device.sh @@ -110,9 +110,6 @@ else for i in $processes; do adb shell kill -9 $i; done fi -echo -e "${green}Set sys.linker.use_generated_config to false if file is absent" -adb shell "test -f /linkerconfig/ld.config.txt || setprop sys.linker.use_generated_config false" - # Chroot environment. # =================== @@ -173,4 +170,12 @@ if [[ -n "$ART_TEST_CHROOT" ]]; then # Create /apex directory in chroot. adb shell mkdir -p "$ART_TEST_CHROOT/apex" + + # Create /linkerconfig directory in chroot. + adb shell mkdir -p "$ART_TEST_CHROOT/linkerconfig" + # Ensure the linker uses a generated linker configuration (we generate this + # linker configuration file on device in `tools/buildbot-sync.sh`, as + # `/system/bin/linkerconfig` requires some files to be present in + # `/system/etc`). + adb shell setprop sys.linker.use_generated_config true fi -- cgit v1.2.3-59-g8ed1b