Commit 90c0a361 authored by Frédéric Mangano-Tarumi's avatar Frédéric Mangano-Tarumi Committed by Lukas Fleischer
Browse files

Support running tests from any directory


Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <lfleischer@archlinux.org>
parent e374a91f
TEST_DIRECTORY="$(pwd)" TOPLEVEL="$(cd "$(dirname "$0")/.." && pwd)"
TOPLEVEL="$(cd .. && pwd)"
. ./sharness.sh . "$TOPLEVEL/test/sharness.sh"
# Configure python search path. # Configure python search path.
PYTHONPATH="$TOPLEVEL" PYTHONPATH="$TOPLEVEL"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
test_description='git-auth tests' test_description='git-auth tests'
. ./setup.sh . "$(dirname "$0")/setup.sh"
test_expect_success 'Test basic authentication.' ' test_expect_success 'Test basic authentication.' '
"$GIT_AUTH" "$AUTH_KEYTYPE_USER" "$AUTH_KEYTEXT_USER" >out && "$GIT_AUTH" "$AUTH_KEYTYPE_USER" "$AUTH_KEYTEXT_USER" >out &&
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
test_description='git-serve tests' test_description='git-serve tests'
. ./setup.sh . "$(dirname "$0")/setup.sh"
test_expect_success 'Test interactive shell.' ' test_expect_success 'Test interactive shell.' '
"$GIT_SERVE" 2>&1 | grep -q "Interactive shell is disabled." "$GIT_SERVE" 2>&1 | grep -q "Interactive shell is disabled."
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
test_description='git-update tests' test_description='git-update tests'
. ./setup.sh . "$(dirname "$0")/setup.sh"
dump_package_info() { dump_package_info() {
for t in Packages Licenses PackageLicenses Groups PackageGroups \ for t in Packages Licenses PackageLicenses Groups PackageGroups \
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
test_description='mkpkglists tests' test_description='mkpkglists tests'
. ./setup.sh . "$(dirname "$0")/setup.sh"
test_expect_success 'Test package list generation with no packages.' ' test_expect_success 'Test package list generation with no packages.' '
echo "DELETE FROM Packages;" | sqlite3 aur.db && echo "DELETE FROM Packages;" | sqlite3 aur.db &&
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
test_description='tuvotereminder tests' test_description='tuvotereminder tests'
. ./setup.sh . "$(dirname "$0")/setup.sh"
test_expect_success 'Test Trusted User vote reminders.' ' test_expect_success 'Test Trusted User vote reminders.' '
now=$(date -d now +%s) && now=$(date -d now +%s) &&
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
test_description='pkgmaint tests' test_description='pkgmaint tests'
. ./setup.sh . "$(dirname "$0")/setup.sh"
test_expect_success 'Test package base cleanup script.' ' test_expect_success 'Test package base cleanup script.' '
now=$(date -d now +%s) && now=$(date -d now +%s) &&
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
test_description='aurblup tests' test_description='aurblup tests'
. ./setup.sh . "$(dirname "$0")/setup.sh"
test_expect_success 'Test official provider update script.' ' test_expect_success 'Test official provider update script.' '
mkdir -p remote/test/foobar-1.0-1 && mkdir -p remote/test/foobar-1.0-1 &&
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
test_description='notify tests' test_description='notify tests'
. ./setup.sh . "$(dirname "$0")/setup.sh"
test_expect_success 'Test out-of-date notifications.' ' test_expect_success 'Test out-of-date notifications.' '
cat <<-EOD | sqlite3 aur.db && cat <<-EOD | sqlite3 aur.db &&
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
test_description='rendercomment tests' test_description='rendercomment tests'
. ./setup.sh . "$(dirname "$0")/setup.sh"
test_expect_success 'Test comment rendering.' ' test_expect_success 'Test comment rendering.' '
cat <<-EOD | sqlite3 aur.db && cat <<-EOD | sqlite3 aur.db &&
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
test_description='usermaint tests' test_description='usermaint tests'
. ./setup.sh . "$(dirname "$0")/setup.sh"
test_expect_success 'Test removal of login IP addresses.' ' test_expect_success 'Test removal of login IP addresses.' '
now=$(date -d now +%s) && now=$(date -d now +%s) &&
......
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