summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2015-01-16 14:14:05 +0800
committerJoe MacDonald <joe_macdonald@mentor.com>2015-03-11 19:29:34 -0400
commit5eec0615e548f58ecdfadfc45af5805eeb58f69c (patch)
tree9c0b36a449d4224ddef22f9007b457c88a62449a
parentebdd38e7f71b16bee538dc1fa8b61da3fdaf4a90 (diff)
downloadmeta-openembedded-5eec0615e548f58ecdfadfc45af5805eeb58f69c.tar.gz
net-snmp: add ptest package
Issue: TA79430 - Change to use append for PACKAGES so that: * ptest package is added from ptest bbcalss * the PN is back, allow empty and add rdepends on net-snmp-client in case the user try to add net-snmp to the image - Add a patch to fix the output format for ptest - Add run-ptest - Add rdepends on perl for ptest (LOCAL REV: NOT UPSTREAM) -- Sent to meta-networking on 20150114 Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch37
-rwxr-xr-xmeta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest4
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb33
3 files changed, 72 insertions, 2 deletions
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch
new file mode 100644
index 000000000..9fb19b3e0
--- /dev/null
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch
@@ -0,0 +1,37 @@
1From 4bb4024b395f19d36ab3569e2773ea80d8cc5261 Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Wed, 14 Jan 2015 15:10:06 +0800
4Subject: [PATCH] testing: add the output format for ptest
5
6Upstream-Status: Inappropriate [OE specific]
7
8Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
9---
10 testing/RUNTESTS | 4 ++++
11 1 files changed, 4 insertions(+), 0 deletions(-)
12
13diff --git a/testing/RUNTESTS b/testing/RUNTESTS
14index e11c969..fb90f76 100755
15--- a/testing/RUNTESTS
16+++ b/testing/RUNTESTS
17@@ -25,13 +25,17 @@ failed_count=0
18 rm -f failed_tests
19 for i in "${srcdir}"/testing/fulltests/default/T*$1*; do
20 echo "RUNNING $i"
21+ test_name=`basename $i`
22 ${srcdir}/testing/fulltests/support/simple_run $i
23 if [ $? = 0 ]; then
24+ echo "PASS: $test_name"
25 success_count=`expr $success_count + 1`
26 else
27+ echo "FAIL: $test_name"
28 failed_count=`expr $failed_count + 1`
29 echo "$i" >> failed_tests
30 fi
31+ echo
32 done
33
34 if [ -f failed_tests ]; then
35--
361.7.1
37
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest b/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest
new file mode 100755
index 000000000..2334217bc
--- /dev/null
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest
@@ -0,0 +1,4 @@
1#!/bin/sh
2
3cd testing
4./RUNTESTS
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
index 1389c3f05..1baf101d9 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
@@ -17,6 +17,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.zip \
17 file://ifmib.patch \ 17 file://ifmib.patch \
18 file://net-snmp-add-knob-whether-nlist.h-are-checked.patch \ 18 file://net-snmp-add-knob-whether-nlist.h-are-checked.patch \
19 file://fix-libtool-finish.patch \ 19 file://fix-libtool-finish.patch \
20 file://net-snmp-testing-add-the-output-format-for-ptest.patch \
21 file://run-ptest \
20" 22"
21 23
22SRC_URI[md5sum] = "a2c83518648b0f2a5d378625e45c0e18" 24SRC_URI[md5sum] = "a2c83518648b0f2a5d378625e45c0e18"
@@ -71,6 +73,24 @@ do_install_append() {
71 install -m 0644 ${WORKDIR}/snmptrapd.service ${D}${systemd_unitdir}/system 73 install -m 0644 ${WORKDIR}/snmptrapd.service ${D}${systemd_unitdir}/system
72} 74}
73 75
76do_install_ptest() {
77 install -d ${D}${PTEST_PATH}
78 for i in ${S}/dist ${S}/include ${B}/include ${S}/mibs ${S}/configure \
79 ${B}/net-snmp-config ${S}/testing; do
80 if [ -e "$i" ]; then
81 cp -a "$i" ${D}${PTEST_PATH}
82 fi
83 done
84 echo `autoconf -V|awk '/autoconf/{print $NF}'` > ${D}${PTEST_PATH}/dist/autoconf-version
85
86 rmdlist="${D}${PTEST_PATH}/dist/net-snmp-solaris-build"
87 for i in $rmdlist; do
88 if [ -d "$i" ]; then
89 rm -rf "$i"
90 fi
91 done
92}
93
74SYSROOT_PREPROCESS_FUNCS += "net_snmp_sysroot_preprocess" 94SYSROOT_PREPROCESS_FUNCS += "net_snmp_sysroot_preprocess"
75 95
76net_snmp_sysroot_preprocess () { 96net_snmp_sysroot_preprocess () {
@@ -80,9 +100,9 @@ net_snmp_sysroot_preprocess () {
80 fi 100 fi
81} 101}
82 102
83PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-dev ${PN}-staticdev ${PN}-static ${PN}-libs \ 103PACKAGES += "${PN}-libs ${PN}-mibs ${PN}-server ${PN}-client ${PN}-server-snmpd ${PN}-server-snmptrapd"
84 ${PN}-mibs ${PN}-server ${PN}-client ${PN}-server-snmpd ${PN}-server-snmptrapd"
85 104
105ALLOW_EMPTY_${PN} = "1"
86ALLOW_EMPTY_${PN}-server = "1" 106ALLOW_EMPTY_${PN}-server = "1"
87 107
88FILES_${PN}-libs = "${libdir}/lib*${SOLIBS}" 108FILES_${PN}-libs = "${libdir}/lib*${SOLIBS}"
@@ -98,6 +118,7 @@ FILES_${PN}-server-snmptrapd = "${sbindir}/snmptrapd \
98 ${systemd_unitdir}/system/snmptrapd.service \ 118 ${systemd_unitdir}/system/snmptrapd.service \
99" 119"
100 120
121FILES_${PN} = ""
101FILES_${PN}-client = "${bindir}/* ${datadir}/snmp/" 122FILES_${PN}-client = "${bindir}/* ${datadir}/snmp/"
102FILES_${PN}-dbg += "${libdir}/.debug/ ${sbindir}/.debug/ ${bindir}/.debug/" 123FILES_${PN}-dbg += "${libdir}/.debug/ ${sbindir}/.debug/ ${bindir}/.debug/"
103FILES_${PN}-dev += "${bindir}/mib2c ${bindir}/mib2c-update" 124FILES_${PN}-dev += "${bindir}/mib2c ${bindir}/mib2c-update"
@@ -117,10 +138,18 @@ SYSTEMD_PACKAGES = "${PN}-server-snmpd \
117SYSTEMD_SERVICE_${PN}-server-snmpd = "snmpd.service" 138SYSTEMD_SERVICE_${PN}-server-snmpd = "snmpd.service"
118SYSTEMD_SERVICE_${PN}-server-snmptrapd = "snmptrapd.service" 139SYSTEMD_SERVICE_${PN}-server-snmptrapd = "snmptrapd.service"
119 140
141RDEPENDS_${PN} += "net-snmp-client"
120RDEPENDS_${PN}-server-snmpd += "net-snmp-mibs" 142RDEPENDS_${PN}-server-snmpd += "net-snmp-mibs"
121RDEPENDS_${PN}-server-snmptrapd += "net-snmp-server-snmpd" 143RDEPENDS_${PN}-server-snmptrapd += "net-snmp-server-snmpd"
122RDEPENDS_${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd" 144RDEPENDS_${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd"
123RDEPENDS_${PN}-client += "net-snmp-mibs" 145RDEPENDS_${PN}-client += "net-snmp-mibs"
146RDEPENDS_${PN}-ptest += "perl \
147 perl-module-test \
148 perl-module-file-basename \
149 perl-module-getopt-long \
150 perl-module-file-temp \
151 perl-module-data-dumper \
152"
124RDEPENDS_${PN}-dev = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})" 153RDEPENDS_${PN}-dev = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})"
125RRECOMMENDS_${PN}-dbg = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})" 154RRECOMMENDS_${PN}-dbg = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})"
126 155