diff options
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 @@ | |||
1 | From 7b259580800e259d232229dc89f97058b56e2fe8 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Hongjun.Yang" <hongjun.yang@windriver.com> | ||
3 | Date: Wed, 22 Oct 2014 10:02:48 +0800 | ||
4 | Subject: [PATCH] Add ptest for tcpdump | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Hongjun.Yang <hongjun.yang@windriver.com> | ||
9 | --- | ||
10 | Makefile.in | 10 +++++++++- | ||
11 | 1 file changed, 9 insertions(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/Makefile.in b/Makefile.in | ||
14 | index 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 | -- | ||
37 | 1.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 | ||
2 | make -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 | " |
15 | SRC_URI[md5sum] = "dab267ec30216a069747d10314079ec7" | 17 | SRC_URI[md5sum] = "dab267ec30216a069747d10314079ec7" |
16 | SRC_URI[sha256sum] = "4c88c2a9aeb4047074f344fc9b2b6577b219972d359e192f6d12ccf983a13fd7" | 18 | SRC_URI[sha256sum] = "4c88c2a9aeb4047074f344fc9b2b6577b219972d359e192f6d12ccf983a13fd7" |
17 | export LIBS=" -lpcap" | 19 | export LIBS=" -lpcap" |
18 | 20 | ||
19 | inherit autotools-brokensep | 21 | inherit autotools-brokensep ptest |
20 | CACHED_CONFIGUREVARS = "ac_cv_linux_vers=${ac_cv_linux_vers=2}" | 22 | CACHED_CONFIGUREVARS = "ac_cv_linux_vers=${ac_cv_linux_vers=2}" |
21 | 23 | ||
22 | PACKAGECONFIG ??= "openssl ipv6" | 24 | PACKAGECONFIG ??= "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 | |||
49 | do_compile_ptest() { | ||
50 | oe_runmake buildtest-TESTS | ||
51 | } | ||