Suggested-by: Mike Holmes <[email protected]>
Signed-off-by: Anders Roxell <[email protected]>
---
configure.ac | 1 +
example/l2fwd_simple/Makefile.am | 2 ++
example/m4/configure.m4 | 12 ++++++++++++
3 files changed, 15 insertions(+)
diff --git a/configure.ac b/configure.ac
index b7879eb..c8fb91e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -129,6 +129,7 @@ AM_CONDITIONAL([netmap_support], [test x$netmap_support =
xyes ])
AM_CONDITIONAL([PKTIO_DPDK], [test x$pktio_dpdk_support = xyes ])
AM_CONDITIONAL([HAVE_PCAP], [test $have_pcap = yes])
AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"])
+AM_CONDITIONAL([test_example], [test x$test_example = xyes ])
AM_CONDITIONAL([test_installdir], [test "$testdir" != ""])
AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ])
AM_CONDITIONAL([test_vald], [test x$test_vald = xyes ])
diff --git a/example/l2fwd_simple/Makefile.am b/example/l2fwd_simple/Makefile.am
index 53b0e26..fe20654 100644
--- a/example/l2fwd_simple/Makefile.am
+++ b/example/l2fwd_simple/Makefile.am
@@ -9,7 +9,9 @@ noinst_HEADERS = \
dist_odp_l2fwd_simple_SOURCES = odp_l2fwd_simple.c
+if test_example
if HAVE_PCAP
TESTS = l2fwd_simple_run.sh
endif
+endif
EXTRA_DIST = l2fwd_simple_run.sh udp64.pcap
diff --git a/example/m4/configure.m4 b/example/m4/configure.m4
index 74869ff..3a7211f 100644
--- a/example/m4/configure.m4
+++ b/example/m4/configure.m4
@@ -1,3 +1,15 @@
+##########################################################################
+# Enable/disable test-example
+##########################################################################
+test_example=no
+AC_ARG_ENABLE([test-example],
+ [ --enable-test-example run basic test aginast examples],
+ [if test "x$enableval" = "xyes"; then
+ test_example=yes
+ else
+ test_example=no
+ fi])
+
AC_CONFIG_FILES([example/classifier/Makefile
example/generator/Makefile
example/ipsec/Makefile
--
2.1.4
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp