1
1
mirror of https://github.com/rui314/mold.git synced 2024-10-05 00:57:08 +03:00
mold/test/elf/mold-wrapper2.sh

23 lines
456 B
Bash
Raw Normal View History

2021-07-01 03:58:18 +03:00
#!/bin/bash
export LANG=
2021-07-01 03:58:18 +03:00
set -e
CC="${CC:-cc}"
CXX="${CXX:-c++}"
testname=$(basename -s .sh "$0")
echo -n "Testing $testname ... "
cd "$(dirname "$0")"/../..
mold="$(pwd)/mold"
2022-01-07 12:06:53 +03:00
t=out/test/elf/$testname
mkdir -p $t
2021-07-01 03:58:18 +03:00
ldd "$mold"-wrapper.so | grep -q libasan && { echo skipped; exit; }
2022-01-07 12:06:53 +03:00
rm -rf $t
mkdir -p $t/bin $t/lib/mold
cp "$mold" $t/bin
cp "$mold"-wrapper.so $t/bin
2021-07-01 03:58:18 +03:00
2022-01-07 12:06:53 +03:00
$t/bin/mold -run bash -c 'echo $LD_PRELOAD' | grep -q '/bin/mold-wrapper.so'
2021-07-01 03:58:18 +03:00
echo OK