summaryrefslogtreecommitdiffstats
path: root/meta-networking
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
parent839a8bb4a708b81bab2b4b41f88769b1726ef59e (diff)
downloadmeta-openembedded-90880880066981071f14a983c2da9f450f244192.tar.gz
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')
-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 000000000..358f6050f
--- /dev/null
+++ b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/add-ptest.patch
@@ -0,0 +1,38 @@
1From 7b259580800e259d232229dc89f97058b56e2fe8 Mon Sep 17 00:00:00 2001
2From: "Hongjun.Yang" <hongjun.yang@windriver.com>
3Date: Wed, 22 Oct 2014 10:02:48 +0800
4Subject: [PATCH] Add ptest for tcpdump
5
6Upstream-Status: Pending
7
8Signed-off-by: Hongjun.Yang <hongjun.yang@windriver.com>
9---
10 Makefile.in | 10 +++++++++-
11 1 file changed, 9 insertions(+), 1 deletion(-)
12
13diff --git a/Makefile.in b/Makefile.in
14index 8c35a45..4fb8ae6 100644
15--- a/Makefile.in
16+++ b/Makefile.in
17@@ -428,9 +428,17 @@ distclean:
18 tests/failure-outputs.txt
19 rm -rf autom4te.cache tests/DIFF tests/NEW
20
21-check: tcpdump
22+buildtest-TESTS: tcpdump
23+
24+runtest-PTEST:
25 (cd tests && ./TESTrun.sh)
26
27+install-ptest:
28+ cp -r tests $(DESTDIR)
29+ cp -r config.h $(DESTDIR)
30+ install -m 0755 Makefile $(DESTDIR)
31+ ln -sf /usr/sbin/tcpdump $(DESTDIR)/tcpdump
32+
33 tags: $(TAGFILES)
34 ctags -wtd $(TAGFILES)
35
36--
371.9.1
38
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 000000000..c03a8b8ef
--- /dev/null
+++ b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/run-ptest
@@ -0,0 +1,5 @@
1#!/bin/sh
2make -k runtest-PTEST | sed -e '/: passed/ s/^/PASS: /g' \
3 -e '/: failed/ s/^/FAIL: /g' \
4 -e 's/: passed//g' \
5 -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 58bcb980f..1fdaf308d 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 = " \
11 file://unnecessary-to-check-libpcap.patch \ 11 file://unnecessary-to-check-libpcap.patch \
12 file://tcpdump-configure-dlpi.patch \ 12 file://tcpdump-configure-dlpi.patch \
13 file://tcpdump-cross-getaddrinfo.patch \ 13 file://tcpdump-cross-getaddrinfo.patch \
14 file://add-ptest.patch \
15 file://run-ptest \
14" 16"
15SRC_URI[md5sum] = "dab267ec30216a069747d10314079ec7" 17SRC_URI[md5sum] = "dab267ec30216a069747d10314079ec7"
16SRC_URI[sha256sum] = "4c88c2a9aeb4047074f344fc9b2b6577b219972d359e192f6d12ccf983a13fd7" 18SRC_URI[sha256sum] = "4c88c2a9aeb4047074f344fc9b2b6577b219972d359e192f6d12ccf983a13fd7"
17export LIBS=" -lpcap" 19export LIBS=" -lpcap"
18 20
19inherit autotools-brokensep 21inherit autotools-brokensep ptest
20CACHED_CONFIGUREVARS = "ac_cv_linux_vers=${ac_cv_linux_vers=2}" 22CACHED_CONFIGUREVARS = "ac_cv_linux_vers=${ac_cv_linux_vers=2}"
21 23
22PACKAGECONFIG ??= "openssl ipv6" 24PACKAGECONFIG ??= "openssl ipv6"
@@ -43,3 +45,7 @@ do_install_append() {
43 # tcpdump 4.0.0 installs a copy to /usr/sbin/tcpdump.4.0.0 45 # tcpdump 4.0.0 installs a copy to /usr/sbin/tcpdump.4.0.0
44 rm -f ${D}${sbindir}/tcpdump.${PV} 46 rm -f ${D}${sbindir}/tcpdump.${PV}
45} 47}
48
49do_compile_ptest() {
50 oe_runmake buildtest-TESTS
51}