diff options
Diffstat (limited to 'tests/set-rpath.sh')
-rwxr-xr-x | tests/set-rpath.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/set-rpath.sh b/tests/set-rpath.sh index 6446395..cbe1006 100755 --- a/tests/set-rpath.sh +++ b/tests/set-rpath.sh @@ -9,11 +9,20 @@ cp main scratch/ cp libfoo.so scratch/libsA/ cp libbar.so scratch/libsB/ -../src/patchelf --set-rpath $(pwd)/scratch/libsA scratch/main -../src/patchelf --set-rpath $(pwd)/scratch/libsB scratch/libsA/libfoo.so +oldRPath=$(../src/patchelf --print-rpath scratch/main) +if test -z "$oldRPath"; then oldRPath="/oops"; fi +../src/patchelf --set-rpath $oldRPath:$(pwd)/scratch/libsA:$(pwd)/scratch/libsB scratch/main + +#oldRPath=$(../src/patchelf --print-rpath scratch/libsA/libfoo.so) +#if test -z "$oldRPath"; then oldRPath="/oops"; fi +#../src/patchelf --set-rpath $oldRPath:$(pwd)/scratch/libsB scratch/libsA/libfoo.so + +#oldRPath=$(../src/patchelf --print-rpath scratch/libsB/libbar.so) +#if test -z "$oldRPath"; then oldRPath="/oops"; fi +#../src/patchelf --set-rpath $oldRPath:$(pwd)/scratch/libsC scratch/libsB/libbar.so exitCode=0 -scratch/main || exitCode=$? +cd scratch && ./main || exitCode=$? if test "$exitCode" != 46; then echo "bad exit code!" |