diff options
author | Vincent Danjean <Vincent.Danjean@ens-lyon.org> | 2012-06-21 09:43:57 (GMT) |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-07-10 22:16:24 (GMT) |
commit | 3226dea3610c8d3cb81b574e1aa478948ddc6c91 (patch) | |
tree | 589be58acd0b07fdee94091f2042f9884bfc8cef /tests/set-rpath.sh | |
parent | d0dac944aeb6385da874d07da2c9897f2f9bd7d6 (diff) | |
download | patchelf-3226dea3610c8d3cb81b574e1aa478948ddc6c91.zip patchelf-3226dea3610c8d3cb81b574e1aa478948ddc6c91.tar.gz patchelf-3226dea3610c8d3cb81b574e1aa478948ddc6c91.tar.bz2 |
Allow parallel execution of tests
Each test use its own subdirectory in scratch/
Diffstat (limited to 'tests/set-rpath.sh')
-rwxr-xr-x | tests/set-rpath.sh | 23 |
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!" |