aboutsummaryrefslogtreecommitdiff
path: root/hooks
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-08-21 16:54:54 -0700
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-11-30 08:25:19 -0800
commit7127217101bb2616e69e5988cc3f7b6b62974b53 (patch)
treee4ebd4d3580115917a80fd4981430b47b2d6199e /hooks
parentff7bac0305d145fa4f53844b5a37e0f51edbc48f (diff)
downloadpaludis-7127217101bb2616e69e5988cc3f7b6b62974b53.tar.gz
paludis-7127217101bb2616e69e5988cc3f7b6b62974b53.tar.xz
test: adjust the hooker test
Adjust the hooker test setup for the new build layout caused by the migration to CMake which does not use libtool. Adjust the setup script for the news and env update hooks.
Diffstat (limited to 'hooks')
-rwxr-xr-xhooks/run_test.bash18
1 files changed, 9 insertions, 9 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