summaryrefslogtreecommitdiffstats
path: root/tests/shrink.sh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-09-29 14:21:40 (GMT)
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-09-29 14:21:40 (GMT)
commit4f3658be12a882a0e09bba96a01010c50b20ff5c (patch)
tree6e395ffa3a34ef8da2da76e6e0896ae45970292d /tests/shrink.sh
parent111c97cf888df0ebf9d30125fe2456b9e638cd12 (diff)
downloadpatchelf-4f3658be12a882a0e09bba96a01010c50b20ff5c.zip
patchelf-4f3658be12a882a0e09bba96a01010c50b20ff5c.tar.gz
patchelf-4f3658be12a882a0e09bba96a01010c50b20ff5c.tar.bz2
* Added some real tests.
Diffstat (limited to 'tests/shrink.sh')
-rwxr-xr-xtests/shrink.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/shrink.sh b/tests/shrink.sh
new file mode 100755
index 0000000..fe50346
--- /dev/null
+++ b/tests/shrink.sh
@@ -0,0 +1,21 @@
+#! /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
+ echo "incomplete RPATH"
+ exit 1
+fi
+
+rm -rf scratch
+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"
+ exit 1
+fi
+