Commit 0fd2d392 authored by Alexander Kartashov's avatar Alexander Kartashov Committed by Pavel Emelyanov

Test suite: added support for the Debian distribution.

* Replaced the shell interpreter with bash to run
  the script test/zdtm.sh correctly.

* Added new directories into the routine contruct_root()
  searched by the Debian version of the dynamic linker.
Signed-off-by: 's avatarAlexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 60066f2d
......@@ -20,7 +20,7 @@ CC := gcc
ECHO := echo
NM := nm
AWK := awk
SH := sh
SH := bash
MAKE := make
OBJCOPY := objcopy
......@@ -190,6 +190,8 @@ clean:
$(Q) $(RM) -rf ./test/dump/
$(Q) $(RM) -f ./*.gcov ./*.gcda ./*.gcno
$(Q) $(RM) -rf ./gcov
$(Q) $(RM) -rf ./test/lib/
$(Q) $(RM) -rf ./test/lib64/
$(Q) $(MAKE) -C protobuf/ clean
$(Q) $(MAKE) -C arch/$(ARCH)/ clean
$(Q) $(MAKE) -C pie/ clean
......
......@@ -180,15 +180,18 @@ construct_root()
{
local root=$1
local test_path=$2
local libdir=$root/lib64
local libdir=$root/lib
local libdir2=$root/lib64
mkdir $libdir
mkdir $libdir $libdir2
for i in `ldd $test_path | awk '{ print $1 }' | grep -v vdso`; do
local lib=`basename $i`
[ -f $libdir/$lib ] && continue ||
[ -f $i ] && cp $i $libdir && continue ||
[ -f /lib64/$i ] && cp /lib64/$i $libdir && continue ||
[ -f /usr/lib64/$i ] && cp /usr/lib64/$i $libdir || return 1
[ -f $i ] && cp $i $libdir && cp $i $libdir2 && continue ||
[ -f /lib64/$i ] && cp /lib64/$i $libdir && cp /lib64/$i $libdir2 && continue ||
[ -f /usr/lib64/$i ] && cp /usr/lib64/$i $libdir && cp /usr/lib64/$i $libdir2 && continue ||
[ -f /lib/x86_64-linux-gnu/$i ] && cp /lib/x86_64-linux-gnu/$i $libdir && cp /lib/x86_64-linux-gnu/$i $libdir2 && continue ||
[ -f /lib/arm-linux-gnueabi/$i ] && cp /lib/arm-linux-gnueabi/$i $libdir && cp /lib/arm-linux-gnueabi/$i $libdir2 && continue || echo "Failed at " $i && return 1
done
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment