Commit 1a999810 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

Make test suite paths top-level directory relative



Determine the top-level directory before running tests and make all
script paths relative to that directory.
Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <lfleischer@archlinux.org>
parent 8c99184f
TEST_DIRECTORY="$(pwd)"
TOPLEVEL="$(cd ../.. && pwd)"
. ./sharness.sh
# Configure python search path.
PYTHONPATH="$TEST_DIRECTORY/../../"
PYTHONPATH="$TOPLEVEL"
export PYTHONPATH
# Configure paths to the Git interface scripts.
GIT_AUTH="$TEST_DIRECTORY/../git-auth.py"
GIT_SERVE="$TEST_DIRECTORY/../git-serve.py"
GIT_UPDATE="$TEST_DIRECTORY/../git-update.py"
GIT_AUTH="$TOPLEVEL/git-interface/git-auth.py"
GIT_SERVE="$TOPLEVEL/git-interface/git-serve.py"
GIT_UPDATE="$TOPLEVEL/git-interface/git-update.py"
# Create the configuration file and a dummy notification script.
cat >config <<-EOF
......@@ -86,7 +87,7 @@ sed \
-e 's/ ENGINE = InnoDB//' \
-e 's/ [A-Z]* UNSIGNED NOT NULL AUTO_INCREMENT/ INTEGER NOT NULL/' \
-e 's/([0-9, ]*) UNSIGNED / UNSIGNED /' \
"$TEST_DIRECTORY/../../schema/aur-schema.sql" | sqlite3 aur.db
"$TOPLEVEL/schema/aur-schema.sql" | sqlite3 aur.db
echo "INSERT INTO Users (ID, UserName, Passwd, Email, AccountTypeID) VALUES (1, 'user', '!', 'user@localhost', 1);" | sqlite3 aur.db
echo "INSERT INTO Users (ID, UserName, Passwd, Email, AccountTypeID) VALUES (2, 'tu', '!', 'tu@localhost', 2);" | sqlite3 aur.db
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment