@@ -26,6 +26,11 @@ TESTS = pktio/pktio_run \
${top_builddir}/test/validation/system/system_main$(EXEEXT)
SUBDIRS = $(ODP_MODULES)
+
+if HAVE_PCAP
+TESTS += pktio/pktio_run_pcap
+endif
+
endif
#performance tests refer to pktio_env
@@ -1,2 +1,6 @@
dist_bin_SCRIPTS = pktio_env \
pktio_run
+
+if HAVE_PCAP
+dist_bin_SCRIPTS += pktio_run_pcap
+endif
new file mode 100755
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# Copyright (c) 2015, Linaro Limited
+# All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+# directories where pktio_main binary can be found:
+# -in the validation dir when running make check (intree or out of tree)
+# -in the script directory, when running after 'make install', or
+# -in the validation when running standalone intree.
+# -in the current directory.
+# running stand alone out of tree requires setting PATH
+PATH=${TEST_DIR}/pktio:$PATH
+PATH=$(dirname $0):$PATH
+PATH=$(dirname $0)/../../../../test/validation/pktio:$PATH
+PATH=.:$PATH
+
+pktio_main_path=$(which pktio_main${EXEEXT})
+if [ -x "$pktio_main_path" ] ; then
+ echo "running with $pktio_main_path"
+else
+ echo "cannot find pktio_main${EXEEXT}: please set you PATH for it."
+fi
+
+PCAP_FNAME=vald.pcap
+export ODP_PKTIO_IF0="pcap:out=${PCAP_FNAME}"
+export ODP_PKTIO_IF1="pcap:in=${PCAP_FNAME}"
+pktio_main${EXEEXT}
+ret=$?
+rm -f ${PCAP_FNAME}
+exit $ret
If pcap is enabled in the build, add a validation test for it. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> --- platform/linux-generic/test/Makefile.am | 5 ++++ platform/linux-generic/test/pktio/Makefile.am | 4 +++ platform/linux-generic/test/pktio/pktio_run_pcap | 33 ++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100755 platform/linux-generic/test/pktio/pktio_run_pcap