summaryrefslogtreecommitdiffstats
path: root/tests/set-interpreter-long.sh
diff options
context:
space:
mode:
authorVincent Danjean <Vincent.Danjean@ens-lyon.org>2012-06-21 09:43:57 (GMT)
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-10 22:16:24 (GMT)
commit3226dea3610c8d3cb81b574e1aa478948ddc6c91 (patch)
tree589be58acd0b07fdee94091f2042f9884bfc8cef /tests/set-interpreter-long.sh
parentd0dac944aeb6385da874d07da2c9897f2f9bd7d6 (diff)
downloadpatchelf-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-interpreter-long.sh')
-rwxr-xr-xtests/set-interpreter-long.sh17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/set-interpreter-long.sh b/tests/set-interpreter-long.sh
index 55ced77..058ccd2 100755
--- a/tests/set-interpreter-long.sh
+++ b/tests/set-interpreter-long.sh
@@ -1,4 +1,5 @@
#! /bin/sh -e
+SCRATCH=scratch/$(basename $0 .sh)
./simple
@@ -10,24 +11,24 @@ if test "$(uname)" = Linux; then
"$oldInterpreter" ./simple
fi
-rm -rf scratch
-mkdir -p scratch
+rm -rf ${SCRATCH}
+mkdir -p ${SCRATCH}
-newInterpreter=$(pwd)/scratch/iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
-cp simple scratch/
-../src/patchelf --set-interpreter "$newInterpreter" scratch/simple
+newInterpreter=$(pwd)/${SCRATCH}/iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+cp simple ${SCRATCH}/
+../src/patchelf --set-interpreter "$newInterpreter" ${SCRATCH}/simple
echo "running with missing interpreter..."
-if scratch/simple; then
+if ${SCRATCH}/simple; then
echo "simple works, but it shouldn't"
exit 1
fi
echo "running with new interpreter..."
ln -s "$oldInterpreter" "$newInterpreter"
-scratch/simple
+${SCRATCH}/simple
if test "$(uname)" = Linux; then
echo "running with explicit interpreter..."
- "$oldInterpreter" scratch/simple
+ "$oldInterpreter" ${SCRATCH}/simple
fi