aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xhooks/run_test.bash18
-rwxr-xr-xpaludis/hooker_TEST_setup.sh6
2 files changed, 12 insertions, 12 deletions
diff --git a/hooks/run_test.bash b/hooks/run_test.bash
index b890fbd3c..5991d2a78 100755
--- a/hooks/run_test.bash
+++ b/hooks/run_test.bash
@@ -31,15 +31,15 @@ test_equality()
fi
}
-if test -f "$TEST_SCRIPT_DIR""${1%.bash}"_"setup.sh" ; then
- echo ">>> setup for test ${1%.bash}"
- if ! "$TEST_SCRIPT_DIR""${1%.bash}"_"setup.sh" ; then
- echo ">>> exiting with error for test ${1%.bash}"
+if test -f "$TEST_SCRIPT_DIR""$(basename "${1}")"_"setup.sh" ; then
+ echo ">>> setup for test $(basename "${1}")"
+ if ! "$TEST_SCRIPT_DIR""$(basename "${1}")"_"setup.sh" ; then
+ echo ">>> exiting with error for test $(basename "${1}")"
exit 255
fi
fi
-echo "Test program ${1%.bash}:"
+echo "Test program $(basename "${1}"):"
source "${1}" || exit 200
for testname in $(set | grep '_TEST *() *$' ) ; do
@@ -50,10 +50,10 @@ for testname in $(set | grep '_TEST *() *$' ) ; do
[[ -z "$local_test_status" ]] && echo " OK" || echo " FAIL"
done
-if test -f "$TEST_SCRIPT_DIR""${1%.bash}"_"cleanup.sh" ; then
- echo ">>> cleanup for test ${1%.bash}"
- if ! "$TEST_SCRIPT_DIR""${1%.bash}"_"cleanup.sh" ; then
- echo ">>> exiting with error for test ${1%.bash}"
+if test -f "$TEST_SCRIPT_DIR""$(basename "${1}")"_"cleanup.sh" ; then
+ echo ">>> cleanup for test $(basename "${1}")"
+ if ! "$TEST_SCRIPT_DIR""$(basename "${1}")"_"cleanup.sh" ; then
+ echo ">>> exiting with error for test $(basename "${1}")"
exit 255
fi
fi
diff --git a/paludis/hooker_TEST_setup.sh b/paludis/hooker_TEST_setup.sh
index a0c0dfbda..bc8228eb6 100755
--- a/paludis/hooker_TEST_setup.sh
+++ b/paludis/hooker_TEST_setup.sh
@@ -51,10 +51,10 @@ chmod +x fancy_hook_output/one.hook
mkdir so_hook
-ln -s ../../.libs/libpaludissohooks_TEST_${PALUDIS_PC_SLOT}.so.${SO_SUFFIX} so_hook
+ln -s ${TOP_BUILDDIR}/paludis/libpaludissohooks_TEST_${PALUDIS_PC_SLOT}.so.${SO_SUFFIX} so_hook
mkdir so_hook_output
-ln -s ../../.libs/libpaludissohooks_TEST_${PALUDIS_PC_SLOT}.so.${SO_SUFFIX} so_hook_output
+ln -s ${TOP_BUILDDIR}/paludis/libpaludissohooks_TEST_${PALUDIS_PC_SLOT}.so.${SO_SUFFIX} so_hook_output
mkdir py_hook
@@ -223,7 +223,7 @@ chmod +x ordering.common
for a in a b c d e f g h i j k ; do
ln -s ../ordering.common ordering/${a}.hook
done
-ln -s ../../.libs/libpaludissohooks_TEST_${PALUDIS_PC_SLOT}.so.${SO_SUFFIX} ordering
+ln -s ${TOP_BUILDDIR}/paludis/libpaludissohooks_TEST_${PALUDIS_PC_SLOT}.so.${SO_SUFFIX} ordering
cat <<"END" > ordering/py_hook.py
def hook_run_ordering(env, hook_env):
file("hooker_TEST_dir/ordering.out", "a").write("py_hook\n")