Support running tests from any directory

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Frédéric Mangano-Tarumi 2020-02-29 01:01:38 +01:00 committed by Lukas Fleischer
parent e374a91feb
commit 90c0a361b5
11 changed files with 12 additions and 13 deletions

View file

@ -1,7 +1,6 @@
TEST_DIRECTORY="$(pwd)"
TOPLEVEL="$(cd .. && pwd)"
TOPLEVEL="$(cd "$(dirname "$0")/.." && pwd)"
. ./sharness.sh
. "$TOPLEVEL/test/sharness.sh"
# Configure python search path.
PYTHONPATH="$TOPLEVEL"

View file

@ -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 &&

View file

@ -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."

View file

@ -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 \

View file

@ -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 &&

View file

@ -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) &&

View file

@ -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) &&

View file

@ -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 &&

View file

@ -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 &&

View file

@ -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 &&

View file

@ -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) &&