aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2015-04-06 14:55:40 +0100
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2015-04-06 14:55:40 +0100
commit7e561b6a05ce051769e66116a2812e037bad8e01 (patch)
tree7d09cb01526b913f8be8e71f0c3e67dc478ae3cd /scripts
parent8be75403a74697c8c6bc3d01d72ff97bb2cbc388 (diff)
Cleanup handling of sysroot for schroot testing
This fixes BZ1376. This patch removes make_target_sysroot since this function doesn't do much anymore. It's only effect -- removal of /lib symlink for aarch64 is now handled in test-schroot.sh script. Incidentally, this patch also fixes a [before unknown] problem of aarch64 testing running against system libc. Change-Id: I972f466136aa652f4a0c62ec50a8fcf51f043063
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/test-schroot.sh19
1 files changed, 13 insertions, 6 deletions
diff --git a/scripts/test-schroot.sh b/scripts/test-schroot.sh
index 26aae374..4268e2e9 100755
--- a/scripts/test-schroot.sh
+++ b/scripts/test-schroot.sh
@@ -220,6 +220,19 @@ fi
if ! [ -z "$sysroot" ]; then
rsync -az -e "$rsh" $sysroot/ root@$target:/sysroot/
+ if [ -e $sysroot/lib64/ld-linux-aarch64.so.1 ]; then
+ # Our aarch64 sysroot has everything in /lib64, but executables
+ # still expect to find dynamic linker under /lib/ld-linux-aarch64.so.1
+ if [ -h $sysroot/lib ]; then
+ $rsh root@$target "rm /sysroot/lib"
+ fi
+ if [ -h $sysroot/lib ] \
+ || ! [ -e $sysroot/lib/ld-linux-aarch64.so.1 ]; then
+ $rsh root@$target "mkdir -p /sysroot/lib/"
+ $rsh root@$target "cd /sysroot/lib; ln -s ../lib64/ld-linux-aarch64.so.1 ."
+ fi
+ fi
+
if ! $use_qemu; then
# Make sure that sysroot libraries are searched before any other.
$rsh root@$target "cat > /etc/ld.so.conf.new" <<EOF
@@ -232,12 +245,6 @@ EOF
# Remove /etc/ld.so.cache to workaround QEMU problem for targets with
# different endianness (i.e., /etc/ld.so.cache is endian-dependent).
$rsh root@$target "rm /etc/ld.so.cache"
- if [ -e $sysroot/lib64/ld-linux-aarch64.so.1 ]; then
- # Our aarch64 sysroot has everything in /lib64, but executables
- # still expect to find dynamic linker under
- # /lib/ld-linux-aarch64.so.1
- $rsh root@$target "ln -s /sysroot/lib64 /sysroot/lib"
- fi
# Cleanup runaway QEMU processes that ran for more than 2 minutes.
# Note the "-S none" option -- ssh does not always detach from process
# when multiplexing is used. I think this is a bug in ssh.