diff options
-rw-r--r-- | meta-networking/recipes-support/unbound/unbound/run-ptest | 17 | ||||
-rw-r--r-- | meta-networking/recipes-support/unbound/unbound_1.20.0.bb | 23 |
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 | |||
3 | cd tests || exit 1 | ||
4 | retVal=0 | ||
5 | ./unittest | ||
6 | ./testbound -s | ||
7 | for 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 | ||
16 | done | ||
17 | exit $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" | |||
9 | LICENSE = "BSD-3-Clause" | 9 | LICENSE = "BSD-3-Clause" |
10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=5308494bc0590c0cb036afd781d78f06" | 10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=5308494bc0590c0cb036afd781d78f06" |
11 | 11 | ||
12 | SRC_URI = "git://github.com/NLnetLabs/unbound.git;protocol=https;branch=branch-1.20.0" | 12 | SRC_URI = "git://github.com/NLnetLabs/unbound.git;protocol=https;branch=branch-1.20.0 \ |
13 | file://run-ptest \ | ||
14 | " | ||
13 | SRCREV = "b9525c5fd47ba481a29b90109017d2253beb105d" | 15 | SRCREV = "b9525c5fd47ba481a29b90109017d2253beb105d" |
14 | 16 | ||
15 | inherit autotools pkgconfig systemd update-rc.d | 17 | inherit autotools pkgconfig systemd update-rc.d ptest |
16 | 18 | ||
17 | DEPENDS = "openssl libtool-native bison-native expat" | 19 | DEPENDS = "openssl libtool-native bison-native expat" |
18 | RDEPENDS:${PN} = "bash openssl-bin daemonize" | 20 | RDEPENDS:${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 | ||
37 | do_compile:append() { | ||
38 | oe_runmake tests | ||
39 | } | ||
40 | |||
35 | do_install:append() { | 41 | do_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 | ||
49 | do_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 | |||
43 | SYSTEMD_SERVICE:${PN} = "${BPN}.service" | 62 | SYSTEMD_SERVICE:${PN} = "${BPN}.service" |
44 | 63 | ||
45 | INITSCRIPT_NAME = "unbound" | 64 | INITSCRIPT_NAME = "unbound" |