diff options
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | t/test_pbuilder-apt-config (renamed from test_pbuilder-apt-config) | 14 | ||||
-rwxr-xr-x | t/test_pbuilder-buildpackage-funcs (renamed from test_pbuilder-buildpackage-funcs) | 11 | ||||
-rwxr-xr-x | t/test_pbuilder-checkparams (renamed from test_pbuilder-checkparams) | 17 | ||||
-rwxr-xr-x | t/test_pbuilder-modules (renamed from test_pbuilder-modules) | 10 | ||||
-rwxr-xr-x | t/test_pbuilder-satisfydepends-checkparams (renamed from test_pbuilder-satisfydepends-checkparams) | 10 | ||||
-rwxr-xr-x | t/test_pbuilder-satisfydepends-classic (renamed from test_pbuilder-satisfydepends-classic) | 10 | ||||
-rwxr-xr-x | t/test_pbuilder-satisfydepends-funcs (renamed from test_pbuilder-satisfydepends-funcs) | 10 | ||||
-rwxr-xr-x | t/test_testlib.sh (renamed from test_testlib.sh) | 10 | ||||
-rw-r--r-- | t/testlib.sh (renamed from testlib.sh) | 0 |
10 files changed, 29 insertions, 65 deletions
@@ -170,7 +170,7 @@ check: $(foreach script,$(CHECK_SCRIPTS),bash -n $(script)$(newline)) $(foreach mp,$(CHECK_MANPAGES),LANG=C MANWIDTH=80 man --warnings -l $(mp) >/dev/null$(newline)) # unit tests. - $(foreach test,$(wildcard ./test_*),$(test)$(newline)) + $(foreach test,$(wildcard ./t/test_*),$(test)$(newline)) full-check: # system tests that might take long. diff --git a/test_pbuilder-apt-config b/t/test_pbuilder-apt-config index 9db4c4e..e00730e 100755 --- a/test_pbuilder-apt-config +++ b/t/test_pbuilder-apt-config @@ -4,20 +4,12 @@ set -e self="$(basename "$0")" -# if this is set, use pbuilder files from this location; otherwise, use -# installed files (from PBUILDER_TEST_ROOT, which is a copy of PBUILDER_ROOT) -PBUILDER_CHECKOUT="${PBUILDER_CHECKOUT:-}" - +TD="$(dirname "$0")" if [ -n "$PBUILDER_CHECKOUT" ]; then - . "$PBUILDER_CHECKOUT/testlib.sh" - + . "$TD/testlib.sh" PBUILDER_APT_CONFIG="$PBUILDER_CHECKOUT/pbuilder-apt-config" else - # these currently don't need to be exported - PBUILDER_TEST_ROOT="${PBUILDER_ROOT:-}" - PBUILDER_TEST_PKGLIBDIR="${PBUILDER_PKGLIBDIR:-$PBUILDER_ROOT/usr/lib/pbuilder}" - . "$PBUILDER_TEST_PKGLIBDIR/testlib.sh" - + . "$TD/testlib.sh" PBUILDER_APT_CONFIG="$PBUILDER_TEST_PKGLIBDIR/pbuilder-apt-config" fi diff --git a/test_pbuilder-buildpackage-funcs b/t/test_pbuilder-buildpackage-funcs index ad11c18..80372f1 100755 --- a/test_pbuilder-buildpackage-funcs +++ b/t/test_pbuilder-buildpackage-funcs @@ -23,17 +23,12 @@ # testsuite to test pbuilder-satisfydepends-funcs. - +TD="$(dirname "$0")" if [ -n "$PBUILDER_CHECKOUT" ]; then - . "$PBUILDER_CHECKOUT/testlib.sh" - + . "$TD/testlib.sh" . "$PBUILDER_CHECKOUT/pbuilder-buildpackage-funcs" else - # these currently don't need to be exported - PBUILDER_TEST_ROOT="${PBUILDER_ROOT:-}" - PBUILDER_TEST_PKGLIBDIR="${PBUILDER_PKGLIBDIR:-$PBUILDER_ROOT/usr/lib/pbuilder}" - . "$PBUILDER_TEST_PKGLIBDIR/testlib.sh" - + . "$TD/testlib.sh" . "$PBUILDER_TEST_PKGLIBDIR/pbuilder-buildpackage-funcs" fi diff --git a/test_pbuilder-checkparams b/t/test_pbuilder-checkparams index cc1af9e..a81ae8d 100755 --- a/test_pbuilder-checkparams +++ b/t/test_pbuilder-checkparams @@ -2,26 +2,19 @@ # testsuite for pbuilder-checkparams +TD="$(dirname "$0")" if [ -n "$PBUILDER_CHECKOUT" ]; then - . "$PBUILDER_CHECKOUT/testlib.sh" + . "$TD/testlib.sh" + PBUILDER_CHECKPARAMS="$PBUILDER_CHECKOUT/pbuilder-checkparams" else - # these currently don't need to be exported - PBUILDER_TEST_ROOT="${PBUILDER_ROOT:-}" - PBUILDER_TEST_PKGLIBDIR="${PBUILDER_PKGLIBDIR:-$PBUILDER_ROOT/usr/lib/pbuilder}" - . "$PBUILDER_TEST_PKGLIBDIR/testlib.sh" + . "$TD/testlib.sh" + PBUILDER_CHECKPARAMS="$PBUILDER_TEST_PKGLIBDIR/pbuilder-checkparams" fi # setup a fake installed environment trap testlib_cleanup_env sigpipe sighup exit testlib_setup_env -if [ -n "$PBUILDER_CHECKOUT" ]; then - PBUILDER_CHECKPARAMS="$PBUILDER_CHECKOUT/pbuilder-checkparams" -else - export PBUILDER_PKGLIBDIR="${PBUILDER_PKGLIBDIR:-$PBUILDER_ROOT/usr/lib/pbuilder}" - PBUILDER_CHECKPARAMS="$PBUILDER_PKGLIBDIR/pbuilder-checkparams" -fi - test_debuildopts() { . "$PBUILDER_CHECKPARAMS" echo "$DEBBUILDOPTS" diff --git a/test_pbuilder-modules b/t/test_pbuilder-modules index d010c98..9e1f6e0 100755 --- a/test_pbuilder-modules +++ b/t/test_pbuilder-modules @@ -1,15 +1,11 @@ #!/bin/bash +TD="$(dirname "$0")" if [ -n "$PBUILDER_CHECKOUT" ]; then - . "$PBUILDER_CHECKOUT/testlib.sh" - + . "$TD/testlib.sh" . "$PBUILDER_CHECKOUT/pbuilder-modules" else - # these currently don't need to be exported - PBUILDER_TEST_ROOT="${PBUILDER_ROOT:-}" - PBUILDER_TEST_PKGLIBDIR="${PBUILDER_PKGLIBDIR:-$PBUILDER_ROOT/usr/lib/pbuilder}" - . "$PBUILDER_TEST_PKGLIBDIR/testlib.sh" - + . "$TD/testlib.sh" . "$PBUILDER_TEST_PKGLIBDIR/pbuilder-modules" fi diff --git a/test_pbuilder-satisfydepends-checkparams b/t/test_pbuilder-satisfydepends-checkparams index 036a048..ccb044d 100755 --- a/test_pbuilder-satisfydepends-checkparams +++ b/t/test_pbuilder-satisfydepends-checkparams @@ -1,15 +1,11 @@ #!/bin/bash +TD="$(dirname "$0")" if [ -n "$PBUILDER_CHECKOUT" ]; then - . "$PBUILDER_CHECKOUT/testlib.sh" - + . "$TD/testlib.sh" PBUILDER_SATISFYDEPENDS_CHECKPARAMS="$PBUILDER_CHECKOUT/pbuilder-satisfydepends-checkparams" else - # these currently don't need to be exported - PBUILDER_TEST_ROOT="${PBUILDER_ROOT:-}" - PBUILDER_TEST_PKGLIBDIR="${PBUILDER_PKGLIBDIR:-$PBUILDER_ROOT/usr/lib/pbuilder}" - . "$PBUILDER_TEST_PKGLIBDIR/testlib.sh" - + . "$TD/testlib.sh" PBUILDER_SATISFYDEPENDS_CHECKPARAMS="$PBUILDER_TEST_PKGLIBDIR/pbuilder-satisfydepends-checkparams" fi diff --git a/test_pbuilder-satisfydepends-classic b/t/test_pbuilder-satisfydepends-classic index c70c778..929699b 100755 --- a/test_pbuilder-satisfydepends-classic +++ b/t/test_pbuilder-satisfydepends-classic @@ -3,16 +3,12 @@ # (. ./pbuilder-satisfydepends-"$flavour") #done +TD="$(dirname "$0")" if [ -n "$PBUILDER_CHECKOUT" ]; then - . "$PBUILDER_CHECKOUT/testlib.sh" - + . "$TD/testlib.sh" PBUILDER_SATISFYDEPENDS_CLASSIC="$PBUILDER_CHECKOUT/pbuilder-satisfydepends-classic" else - # these currently don't need to be exported - PBUILDER_TEST_ROOT="${PBUILDER_ROOT:-}" - PBUILDER_TEST_PKGLIBDIR="${PBUILDER_PKGLIBDIR:-$PBUILDER_ROOT/usr/lib/pbuilder}" - . "$PBUILDER_TEST_PKGLIBDIR/testlib.sh" - + . "$TD/testlib.sh" PBUILDER_SATISFYDEPENDS_CLASSIC="$PBUILDER_TEST_PKGLIBDIR/pbuilder-satisfydepends-classic" fi diff --git a/test_pbuilder-satisfydepends-funcs b/t/test_pbuilder-satisfydepends-funcs index 9cfc7f2..5aaee9b 100755 --- a/test_pbuilder-satisfydepends-funcs +++ b/t/test_pbuilder-satisfydepends-funcs @@ -2,16 +2,12 @@ # testsuite to test pbuilder-satisfydepends-funcs. +TD="$(dirname "$0")" if [ -n "$PBUILDER_CHECKOUT" ]; then - . "$PBUILDER_CHECKOUT/testlib.sh" - + . "$TD/testlib.sh" . "$PBUILDER_CHECKOUT/pbuilder-satisfydepends-funcs" else - # these currently don't need to be exported - PBUILDER_TEST_ROOT="${PBUILDER_ROOT:-}" - PBUILDER_TEST_PKGLIBDIR="${PBUILDER_PKGLIBDIR:-$PBUILDER_ROOT/usr/lib/pbuilder}" - . "$PBUILDER_TEST_PKGLIBDIR/testlib.sh" - + . "$TD/testlib.sh" . "$PBUILDER_TEST_PKGLIBDIR/pbuilder-satisfydepends-funcs" fi diff --git a/test_testlib.sh b/t/test_testlib.sh index be20c58..a37f6b1 100755 --- a/test_testlib.sh +++ b/t/test_testlib.sh @@ -1,13 +1,13 @@ #!/bin/bash # testsuite for testlib +TD="$(dirname "$0")" if [ -n "$PBUILDER_CHECKOUT" ]; then - . "$PBUILDER_CHECKOUT/testlib.sh" + . "$TD/testlib.sh" + . "$PBUILDER_CHECKOUT/pbuilder-modules" else - # these currently don't need to be exported - PBUILDER_TEST_ROOT="${PBUILDER_ROOT:-}" - PBUILDER_TEST_PKGLIBDIR="${PBUILDER_PKGLIBDIR:-$PBUILDER_ROOT/usr/lib/pbuilder}" - . "$PBUILDER_TEST_PKGLIBDIR/testlib.sh" + . "$TD/testlib.sh" + . "$PBUILDER_TEST_PKGLIBDIR/pbuilder-modules" fi test_success() { diff --git a/testlib.sh b/t/testlib.sh index 7d31888..7d31888 100644 --- a/testlib.sh +++ b/t/testlib.sh |