move all tests under a t/ directory

parent 524cde2e
......@@ -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.
......
......@@ -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
......
......@@ -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
......
......@@ -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"
......
#!/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
......
#!/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
......
......@@ -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
......
......@@ -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
......
#!/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() {
......
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