aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/tcpdump
diff options
context:
space:
mode:
authorHongjun.Yang <hongjun.yang@windriver.com>2014-10-22 15:42:42 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2014-10-30 08:59:31 +0100
commit90880880066981071f14a983c2da9f450f244192 (patch)
tree0fa23ac30f08c04c68d43bc32f466f77b7d6ca80 /meta-networking/recipes-support/tcpdump
parent839a8bb4a708b81bab2b4b41f88769b1726ef59e (diff)
downloadmeta-openembedded-contrib-90880880066981071f14a983c2da9f450f244192.tar.gz
meta-openembedded-contrib-90880880066981071f14a983c2da9f450f244192.tar.bz2
meta-openembedded-contrib-90880880066981071f14a983c2da9f450f244192.zip
tcpdump: Add ptest
Add ptest supports for tcpdump Signed-off-by: Hongjun.Yang <hongjun.yang@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-networking/recipes-support/tcpdump')
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/add-ptest.patch38
-rwxr-xr-xmeta-networking/recipes-support/tcpdump/tcpdump-4.6.1/run-ptest5
-rw-r--r--meta-networking/recipes-support/tcpdump/tcpdump_4.6.1.bb8
3 files changed, 50 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/add-ptest.patch b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/add-ptest.patch
new file mode 100644
index 0000000000..358f6050f6
--- /dev/null
+++ b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/add-ptest.patch
@@ -0,0 +1,38 @@
+From 7b259580800e259d232229dc89f97058b56e2fe8 Mon Sep 17 00:00:00 2001
+From: "Hongjun.Yang" <hongjun.yang@windriver.com>
+Date: Wed, 22 Oct 2014 10:02:48 +0800
+Subject: [PATCH] Add ptest for tcpdump
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongjun.Yang <hongjun.yang@windriver.com>
+---
+ Makefile.in | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 8c35a45..4fb8ae6 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -428,9 +428,17 @@ distclean:
+ tests/failure-outputs.txt
+ rm -rf autom4te.cache tests/DIFF tests/NEW
+
+-check: tcpdump
++buildtest-TESTS: tcpdump
++
++runtest-PTEST:
+ (cd tests && ./TESTrun.sh)
+
++install-ptest:
++ cp -r tests $(DESTDIR)
++ cp -r config.h $(DESTDIR)
++ install -m 0755 Makefile $(DESTDIR)
++ ln -sf /usr/sbin/tcpdump $(DESTDIR)/tcpdump
++
+ tags: $(TAGFILES)
+ ctags -wtd $(TAGFILES)
+
+--
+1.9.1
+
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/run-ptest b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/run-ptest
new file mode 100755
index 0000000000..c03a8b8ef3
--- /dev/null
+++ b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+make -k runtest-PTEST | sed -e '/: passed/ s/^/PASS: /g' \
+ -e '/: failed/ s/^/FAIL: /g' \
+ -e 's/: passed//g' \
+ -e 's/: failed//g'
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump_4.6.1.bb b/meta-networking/recipes-support/tcpdump/tcpdump_4.6.1.bb
index 58bcb980f5..1fdaf308d8 100644
--- a/meta-networking/recipes-support/tcpdump/tcpdump_4.6.1.bb
+++ b/meta-networking/recipes-support/tcpdump/tcpdump_4.6.1.bb
@@ -11,12 +11,14 @@ SRC_URI = " \
file://unnecessary-to-check-libpcap.patch \
file://tcpdump-configure-dlpi.patch \
file://tcpdump-cross-getaddrinfo.patch \
+ file://add-ptest.patch \
+ file://run-ptest \
"
SRC_URI[md5sum] = "dab267ec30216a069747d10314079ec7"
SRC_URI[sha256sum] = "4c88c2a9aeb4047074f344fc9b2b6577b219972d359e192f6d12ccf983a13fd7"
export LIBS=" -lpcap"
-inherit autotools-brokensep
+inherit autotools-brokensep ptest
CACHED_CONFIGUREVARS = "ac_cv_linux_vers=${ac_cv_linux_vers=2}"
PACKAGECONFIG ??= "openssl ipv6"
@@ -43,3 +45,7 @@ do_install_append() {
# tcpdump 4.0.0 installs a copy to /usr/sbin/tcpdump.4.0.0
rm -f ${D}${sbindir}/tcpdump.${PV}
}
+
+do_compile_ptest() {
+ oe_runmake buildtest-TESTS
+}