summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-09-13 10:24:21 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-09-13 10:24:21 +0000
commita1a21bdec3179b4d05c468dcef82d4073577bb6c (patch)
tree5c6f7d0e25bc9db543b80e5d99009c2b5d8a136f
parentReleasing progress-linux version 3.0.0-3~dschinn1. (diff)
downloadknot-resolver-a1a21bdec3179b4d05c468dcef82d4073577bb6c.zip
knot-resolver-a1a21bdec3179b4d05c468dcef82d4073577bb6c.tar.xz
Merging debian version 3.0.0-4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--debian/changelog9
-rw-r--r--debian/clean1
-rwxr-xr-xdebian/rules11
-rwxr-xr-xdebian/tests/roundtrip11
4 files changed, 20 insertions, 12 deletions
diff --git a/debian/changelog b/debian/changelog
index 25997b9..be6225d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+knot-resolver (3.0.0-4) unstable; urgency=medium
+
+ * Re-enable tests on all architectures
+ * autopkgtest: be more verbose about error
+ * autopkgtest: allow specifying module directory
+ * point to modules needed to run roundtrip test at build time
+
+ -- Daniel Kahn Gillmor <dkg@fifthhorseman.net> Fri, 31 Aug 2018 14:00:24 -0400
+
knot-resolver (3.0.0-3~dschinn1) dschinn-backports; urgency=medium
* Uploading to dschinn-backports, remaining changes:
diff --git a/debian/clean b/debian/clean
index 8a613a2..ebcef33 100644
--- a/debian/clean
+++ b/debian/clean
@@ -2,3 +2,4 @@ doc/kresd.8
libkres.pc
lib/libkres.a
lib/libkres.so.8
+test-modules/
diff --git a/debian/rules b/debian/rules
index 4becfc7..87831d0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -18,12 +18,6 @@ export PREFIX=/usr
export MODULEDIR=/usr/lib/knot-resolver
export ETCDIR=/etc/knot-resolver
-RUN_TESTS := yes
-ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),hurd-i386 mips mipsel ppc64 ppc64el armel armhf arm64 kfreebsd-amd64 kfreebsd-i386))
- $(warning Disabling checks on $(DEB_HOST_ARCH))
- RUN_TESTS := no
-endif
-
%:
dh $@
@@ -57,11 +51,10 @@ override_dh_installsystemd:
override_dh_auto_test-indep:
override_dh_auto_test-arch:
-ifeq ($(RUN_TESTS),yes)
dh_auto_test -- V=1
ifeq (, $(filter nocheck, $(DEB_BUILD_OPTIONS)))
- LD_LIBRARY_PATH=$(CURDIR)/lib KRESD=$(CURDIR)/daemon/kresd debian/tests/roundtrip
-endif
+ mkdir -p test-modules && (cd test-modules && ln -sf ../modules/*/*.lua ../modules/*/*.so ../modules/policy/lua-aho-corasick/*.lua ../modules/policy/lua-aho-corasick/*.so ../daemon/lua/* ./)
+ MODULE_DIR=$(CURDIR)/test-modules LD_LIBRARY_PATH=$(CURDIR)/lib KRESD=$(CURDIR)/daemon/kresd debian/tests/roundtrip
endif
override_dh_missing:
diff --git a/debian/tests/roundtrip b/debian/tests/roundtrip
index c1af873..af2661e 100755
--- a/debian/tests/roundtrip
+++ b/debian/tests/roundtrip
@@ -19,7 +19,12 @@ ip="${TESTIP:-127.$(( $RANDOM % 256 )).$(( $RANDOM % 256 )).$(( $RANDOM % 256 ))
kresd="${KRESD:-/usr/sbin/kresd}"
kdig="${KDIG:-$(which kdig)}"
-printf "%s + %s roundtrip tests\n------------\n workdir: %s\n IP addr: %s\n" "$kresd" "$kdig" "$d" "$ip"
+declare -a kresd_args=(--addr="$ip@8053" --tls="$ip@8853" --forks=1 --config="$d/kresd.conf" --quiet)
+if [ -n "$MODULE_DIR" ]; then
+ kresd_args+=(-m "$MODULE_DIR")
+fi
+
+printf "%s + %s roundtrip tests\n------------\n workdir: %s\n IP addr: %s\n kresd args: %s\n" "$kresd" "$kdig" "$d" "$ip" "${kresd_args[*]}"
section() {
printf "\n%s\n" "$1"
@@ -29,7 +34,7 @@ section() {
cleanup () {
section "cleaning up"
find "$d" -ls
- tail "$d"/*.err
+ tail -n +1 -v "$d"/*.err
echo 'quit()' | socat STDIO "UNIX-CONNECT:$(echo "$d/tty/"*)"
if [ "$remove" ]; then
printf "cleaning up working directory %s\n" "$remove"
@@ -72,7 +77,7 @@ modules = { 'hints > iterate' }
net.tls("$d/ee-cert.pem", "$d/ee-key.pem")
hints["monkeys.example"] = "127.15.23.5"
EOF
-"$kresd" --addr="$ip@8053" --tls="$ip@8853" --forks=1 --config="$d/kresd.conf" --quiet "$d" 2> "$d/kresd.err" &
+"$kresd" "${kresd_args[@]}" "$d" 2> "$d/kresd.err" &
sleep 1