summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/shrink.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/shrink.sh b/tests/shrink.sh
index fe50346..563270f 100755
--- a/tests/shrink.sh
+++ b/tests/shrink.sh
@@ -1,8 +1,8 @@
#! /bin/sh -e
-echo -n "RPATH before: "
-readelf -a ./libfoo.so | grep RPATH
-if ! readelf -a ./libfoo.so | grep RPATH | grep -q /no-such-path; then
+rpath=$(../src/patchelf --print-rpath ./libfoo.so)
+echo "RPATH before: $rpath"
+if ! echo "$rpath" | grep -q /no-such-path; then
echo "incomplete RPATH"
exit 1
fi
@@ -12,10 +12,10 @@ mkdir -p scratch
cp libfoo.so scratch/
../src/patchelf --shrink-rpath scratch/libfoo.so
-echo -n "RPATH after: "
-readelf -a scratch/libfoo.so | grep RPATH
-if readelf -a scratch/libfoo.so | grep RPATH | grep -q /no-such-path; then
- echo "incomplete RPATH"
+rpath=$(../src/patchelf --print-rpath scratch/libfoo.so)
+echo "RPATH after: $rpath"
+if echo "$rpath" | grep -q /no-such-path; then
+ echo "RPATH not shrunk"
exit 1
fi