summaryrefslogtreecommitdiffstats
path: root/tests/set-rpath.sh
diff options
context:
space:
mode:
authorVincent Danjean <Vincent.Danjean@ens-lyon.org>2012-06-21 09:43:57 (GMT)
committerVincent Danjean <Vincent.Danjean@ens-lyon.org>2012-06-21 09:43:57 (GMT)
commit8d6a477b990285b4fba3f3e27cefe6da40fe77a1 (patch)
tree589be58acd0b07fdee94091f2042f9884bfc8cef /tests/set-rpath.sh
parenteefa2c9d0fd755634478072040e49259c3f458c3 (diff)
downloadpatchelf-8d6a477b990285b4fba3f3e27cefe6da40fe77a1.zip
patchelf-8d6a477b990285b4fba3f3e27cefe6da40fe77a1.tar.gz
patchelf-8d6a477b990285b4fba3f3e27cefe6da40fe77a1.tar.bz2
Allow parallel execution of tests
Each test use its own subdirectory in scratch/
Diffstat (limited to 'tests/set-rpath.sh')
-rwxr-xr-xtests/set-rpath.sh23
1 files changed, 12 insertions, 11 deletions
diff --git a/tests/set-rpath.sh b/tests/set-rpath.sh
index b797017..90452f9 100755
--- a/tests/set-rpath.sh
+++ b/tests/set-rpath.sh
@@ -1,24 +1,25 @@
#! /bin/sh -e
+SCRATCH=scratch/$(basename $0 .sh)
-rm -rf scratch
-mkdir -p scratch
-mkdir -p scratch/libsA
-mkdir -p scratch/libsB
+rm -rf ${SCRATCH}
+mkdir -p ${SCRATCH}
+mkdir -p ${SCRATCH}/libsA
+mkdir -p ${SCRATCH}/libsB
-cp main scratch/
-cp libfoo.so scratch/libsA/
-cp libbar.so scratch/libsB/
+cp main ${SCRATCH}/
+cp libfoo.so ${SCRATCH}/libsA/
+cp libbar.so ${SCRATCH}/libsB/
-oldRPath=$(../src/patchelf --print-rpath scratch/main)
+oldRPath=$(../src/patchelf --print-rpath ${SCRATCH}/main)
if test -z "$oldRPath"; then oldRPath="/oops"; fi
-../src/patchelf --force-rpath --set-rpath $oldRPath:$(pwd)/scratch/libsA:$(pwd)/scratch/libsB scratch/main
+../src/patchelf --force-rpath --set-rpath $oldRPath:$(pwd)/${SCRATCH}/libsA:$(pwd)/${SCRATCH}/libsB ${SCRATCH}/main
if test "$(uname)" = FreeBSD; then
- export LD_LIBRARY_PATH=$(pwd)/scratch/libsB
+ export LD_LIBRARY_PATH=$(pwd)/${SCRATCH}/libsB
fi
exitCode=0
-(cd scratch && ./main) || exitCode=$?
+(cd ${SCRATCH} && ./main) || exitCode=$?
if test "$exitCode" != 46; then
echo "bad exit code!"