aboutsummaryrefslogtreecommitdiff
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
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.
-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")