This will allow us to override the path with wrappers to provide additional functionality, such as for Valgrind.
Signed-off-by: John Keeping <j...@keeping.me.uk> --- tests/setup.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/setup.sh b/tests/setup.sh index f4bdafd..81594cf 100755 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -19,6 +19,9 @@ TEST_NO_CREATE_REPO=YesPlease . "$TEST_DIRECTORY"/test-lib.sh +# Prepend the directory containing cgit to PATH. +PATH="$(pwd)/../..:$PATH" + mkrepo() { name=$1 count=$2 @@ -89,12 +92,12 @@ EOF cgit_query() { - CGIT_CONFIG="$PWD/cgitrc" QUERY_STRING="$1" "$PWD/../../cgit" + CGIT_CONFIG="$PWD/cgitrc" QUERY_STRING="$1" cgit } cgit_url() { - CGIT_CONFIG="$PWD/cgitrc" QUERY_STRING="url=$1" "$PWD/../../cgit" + CGIT_CONFIG="$PWD/cgitrc" QUERY_STRING="url=$1" cgit } test -z "$CGIT_TEST_NO_CREATE_REPOS" && setup_repos -- 1.8.2.694.ga76e9c3.dirty _______________________________________________ cgit mailing list cgit@hjemli.net http://hjemli.net/mailman/listinfo/cgit