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