[PATCH 07/12] tests: put cgit onto $PATH
John Keeping
john at keeping.me.uk
Mon Apr 8 21:12:36 CEST 2013
This will allow us to override the path with wrappers to provide
additional functionality, such as for Valgrind.
Signed-off-by: John Keeping <john at 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
More information about the CGit
mailing list