summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-support/unbound/unbound/run-ptest17
-rw-r--r--meta-networking/recipes-support/unbound/unbound_1.20.0.bb23
2 files changed, 38 insertions, 2 deletions
diff --git a/meta-networking/recipes-support/unbound/unbound/run-ptest b/meta-networking/recipes-support/unbound/unbound/run-ptest
new file mode 100644
index 0000000000..433a687c65
--- /dev/null
+++ b/meta-networking/recipes-support/unbound/unbound/run-ptest
@@ -0,0 +1,17 @@
1#!/bin/sh
2
3cd tests || exit 1
4retVal=0
5./unittest
6./testbound -s
7for x in ./testdata/*.rpl; do
8 output="$(./testbound -p $x -o -vvvvv 2>&1)"
9 if test $? -eq 0; then
10 echo "$x :Pass"
11 else
12 echo "$output"
13 echo "$x :Fail"
14 retVal=1
15 fi
16done
17exit $retVal
diff --git a/meta-networking/recipes-support/unbound/unbound_1.20.0.bb b/meta-networking/recipes-support/unbound/unbound_1.20.0.bb
index fe0111f595..cb4ac04dd8 100644
--- a/meta-networking/recipes-support/unbound/unbound_1.20.0.bb
+++ b/meta-networking/recipes-support/unbound/unbound_1.20.0.bb
@@ -9,10 +9,12 @@ SECTION = "net"
9LICENSE = "BSD-3-Clause" 9LICENSE = "BSD-3-Clause"
10LIC_FILES_CHKSUM = "file://LICENSE;md5=5308494bc0590c0cb036afd781d78f06" 10LIC_FILES_CHKSUM = "file://LICENSE;md5=5308494bc0590c0cb036afd781d78f06"
11 11
12SRC_URI = "git://github.com/NLnetLabs/unbound.git;protocol=https;branch=branch-1.20.0" 12SRC_URI = "git://github.com/NLnetLabs/unbound.git;protocol=https;branch=branch-1.20.0 \
13 file://run-ptest \
14 "
13SRCREV = "b9525c5fd47ba481a29b90109017d2253beb105d" 15SRCREV = "b9525c5fd47ba481a29b90109017d2253beb105d"
14 16
15inherit autotools pkgconfig systemd update-rc.d 17inherit autotools pkgconfig systemd update-rc.d ptest
16 18
17DEPENDS = "openssl libtool-native bison-native expat" 19DEPENDS = "openssl libtool-native bison-native expat"
18RDEPENDS:${PN} = "bash openssl-bin daemonize" 20RDEPENDS:${PN} = "bash openssl-bin daemonize"
@@ -32,6 +34,10 @@ do_configure:append() {
32 sed -i -e 's#${RECIPE_SYSROOT}##g' ${B}/config.h 34 sed -i -e 's#${RECIPE_SYSROOT}##g' ${B}/config.h
33} 35}
34 36
37do_compile:append() {
38 oe_runmake tests
39}
40
35do_install:append() { 41do_install:append() {
36 install -d ${D}${systemd_unitdir}/system 42 install -d ${D}${systemd_unitdir}/system
37 install -m 0644 ${B}/contrib/unbound.service ${D}${systemd_unitdir}/system 43 install -m 0644 ${B}/contrib/unbound.service ${D}${systemd_unitdir}/system
@@ -40,6 +46,19 @@ do_install:append() {
40 install -m 0755 ${S}/contrib/unbound.init_yocto ${D}${sysconfdir}/init.d/unbound 46 install -m 0755 ${S}/contrib/unbound.init_yocto ${D}${sysconfdir}/init.d/unbound
41} 47}
42 48
49do_install_ptest() {
50 install -d ${D}${PTEST_PATH}/tests
51 install -d ${D}${PTEST_PATH}/tests/testdata
52
53 install -m 0544 ${B}/unittest ${D}${PTEST_PATH}/tests/
54 install -m 0544 ${B}/testbound ${D}${PTEST_PATH}/tests/
55 install -m 0664 ${S}/testdata/test_signatures* ${D}${PTEST_PATH}/tests/
56 install -m 0664 ${S}/testdata/test_sigs* ${D}${PTEST_PATH}/tests/
57 install -m 0664 ${S}/testdata/test_ds* ${D}${PTEST_PATH}/tests/
58 install -m 0664 ${S}/testdata/test_nsec3_hash* ${D}${PTEST_PATH}/tests/
59 install -m 0644 ${S}/testdata/*.rpl ${D}/${PTEST_PATH}/tests/testdata/
60}
61
43SYSTEMD_SERVICE:${PN} = "${BPN}.service" 62SYSTEMD_SERVICE:${PN} = "${BPN}.service"
44 63
45INITSCRIPT_NAME = "unbound" 64INITSCRIPT_NAME = "unbound"