Examples should not duplicate pcap files

Install the scripts and pcap file so that it can be run where it
is installed after moving it to a common location in the repo

Signed-off-by: Mike Holmes <mike.hol...@linaro.org>
---
 Makefile.am                              |   3 ++-
 configure.ac                             |   1 +
 example/l2fwd_simple/Makefile.am         |   4 +++-
 example/l2fwd_simple/l2fwd_simple_run.sh |   2 +-
 example/l2fwd_simple/udp64.pcap          | Bin 7624 -> 0 bytes
 example/packet/Makefile.am               |   4 +++-
 example/packet/pktio_run.sh              |   2 +-
 example/packet/udp64.pcap                | Bin 7624 -> 0 bytes
 example/switch/Makefile.am               |   4 +++-
 example/switch/switch_run.sh             |   2 +-
 example/switch/udp64.pcap                | Bin 7624 -> 0 bytes
 pcap/Makefile.am                         |   3 +++
 pcap/udp64.pcap                          | Bin 0 -> 7624 bytes
 13 files changed, 18 insertions(+), 7 deletions(-)
 delete mode 100644 example/l2fwd_simple/udp64.pcap
 delete mode 100644 example/packet/udp64.pcap
 delete mode 100644 example/switch/udp64.pcap
 create mode 100644 pcap/Makefile.am
 create mode 100644 pcap/udp64.pcap

diff --git a/Makefile.am b/Makefile.am
index 2129472..c1bd594 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,7 +13,8 @@ SUBDIRS = @platform_with_platform@ \
          helper/test \
          doc \
          example \
-         scripts
+         scripts \
+         pcap
 
 @DX_RULES@
 
diff --git a/configure.ac b/configure.ac
index 7cd6670..1ef9739 100644
--- a/configure.ac
+++ b/configure.ac
@@ -232,6 +232,7 @@ AC_CONFIG_FILES([Makefile
                 pkgconfig/libodp-linux.pc
                 pkgconfig/libodphelper-linux.pc
                 scripts/Makefile
+                pcap/Makefile
                 ])
 
 AC_SEARCH_LIBS([timer_create],[rt posix4])
diff --git a/example/l2fwd_simple/Makefile.am b/example/l2fwd_simple/Makefile.am
index fe20654..ca87d49 100644
--- a/example/l2fwd_simple/Makefile.am
+++ b/example/l2fwd_simple/Makefile.am
@@ -9,9 +9,11 @@ noinst_HEADERS = \
 
 dist_odp_l2fwd_simple_SOURCES = odp_l2fwd_simple.c
 
+dist_bin_SCRIPTS = l2fwd_simple_run.sh
+
 if test_example
 if HAVE_PCAP
 TESTS = l2fwd_simple_run.sh
 endif
 endif
-EXTRA_DIST = l2fwd_simple_run.sh udp64.pcap
+EXTRA_DIST = l2fwd_simple_run.sh
diff --git a/example/l2fwd_simple/l2fwd_simple_run.sh 
b/example/l2fwd_simple/l2fwd_simple_run.sh
index 6050360..d88fdf6 100755
--- a/example/l2fwd_simple/l2fwd_simple_run.sh
+++ b/example/l2fwd_simple/l2fwd_simple_run.sh
@@ -6,7 +6,7 @@
 # SPDX-License-Identifier:     BSD-3-Clause
 #
 
-PCAP_IN=`find . ${TEST_DIR} $(dirname $0) -name udp64.pcap -print -quit`
+PCAP_IN=`find . ../../pcap -name udp64.pcap -print -quit`
 echo "using PCAP_IN = ${PCAP_IN}"
 
 ./odp_l2fwd_simple pcap:in=${PCAP_IN} pcap:out=pcapout.pcap 02:00:00:00:00:01 
02:00:00:00:00:02 &
diff --git a/example/l2fwd_simple/udp64.pcap b/example/l2fwd_simple/udp64.pcap
deleted file mode 100644
index 
45f9d6e6341a331125e1e3e49ab8ad1e71b20712..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 7624
zcmca|c+)~A1{MYw_+QV!zzF1AIDRVZQX4OW4Ui4OOdthJV3Lu8!IgnQ52VaNFl`SP
zPy-M%&2gOL#31#rG%+bTB{eNQBQq;ICpRy@ps;AvtkLiqO%tPeXtbOdEel8Mj?wyY
zv^_D}W*Ti5GK{vPNBat+eXG&_<7gilID#<RE*xzaj<yR&+l8a;!qKvDbPRcP%zboT
XVRY^UIO8<hE*$M6kM@y?=pzFFfL+O&

diff --git a/example/packet/Makefile.am b/example/packet/Makefile.am
index af729b0..811b21a 100644
--- a/example/packet/Makefile.am
+++ b/example/packet/Makefile.am
@@ -9,9 +9,11 @@ noinst_HEADERS = \
 
 dist_odp_pktio_SOURCES = odp_pktio.c
 
+dist_bin_SCRIPTS = pktio_run.sh
+
 if test_example
 if HAVE_PCAP
 TESTS = pktio_run.sh
 endif
 endif
-EXTRA_DIST = pktio_run.sh udp64.pcap
+EXTRA_DIST = pktio_run.sh
diff --git a/example/packet/pktio_run.sh b/example/packet/pktio_run.sh
index 3adb2d6..c5860d1 100755
--- a/example/packet/pktio_run.sh
+++ b/example/packet/pktio_run.sh
@@ -6,7 +6,7 @@
 # SPDX-License-Identifier:     BSD-3-Clause
 #
 
-PCAP_IN=`find . ${TEST_DIR} $(dirname $0) -name udp64.pcap -print -quit`
+PCAP_IN=`find ../../pcap -name udp64.pcap -print -quit`
 PCAP_OUT="pcapout.pcap"
 PCAP_IN_SIZE=`stat -c %s ${PCAP_IN}`
 echo "using PCAP in=${PCAP_IN}:out=${PCAP_OUT} size %${PCAP_IN_SIZE}"
diff --git a/example/packet/udp64.pcap b/example/packet/udp64.pcap
deleted file mode 100644
index 
45f9d6e6341a331125e1e3e49ab8ad1e71b20712..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 7624
zcmca|c+)~A1{MYw_+QV!zzF1AIDRVZQX4OW4Ui4OOdthJV3Lu8!IgnQ52VaNFl`SP
zPy-M%&2gOL#31#rG%+bTB{eNQBQq;ICpRy@ps;AvtkLiqO%tPeXtbOdEel8Mj?wyY
zv^_D}W*Ti5GK{vPNBat+eXG&_<7gilID#<RE*xzaj<yR&+l8a;!qKvDbPRcP%zboT
XVRY^UIO8<hE*$M6kM@y?=pzFFfL+O&

diff --git a/example/switch/Makefile.am b/example/switch/Makefile.am
index 4134bcf..047e8ca 100644
--- a/example/switch/Makefile.am
+++ b/example/switch/Makefile.am
@@ -9,9 +9,11 @@ noinst_HEADERS = \
 
 dist_odp_switch_SOURCES = odp_switch.c
 
+dist_bin_SCRIPTS = switch_run.sh
+
 if test_example
 if HAVE_PCAP
 TESTS = switch_run.sh
 endif
 endif
-EXTRA_DIST = switch_run.sh udp64.pcap
+EXTRA_DIST = switch_run.sh
diff --git a/example/switch/switch_run.sh b/example/switch/switch_run.sh
index 9b32973..238564f 100755
--- a/example/switch/switch_run.sh
+++ b/example/switch/switch_run.sh
@@ -9,7 +9,7 @@
 NUM_RX_PORT=3
 RETVAL=0
 
-PCAP_IN=`find . ${TEST_DIR} $(dirname $0) -name udp64.pcap -print -quit`
+PCAP_IN=`find . ../../pcap -name udp64.pcap -print -quit`
 
 echo "Switch test using PCAP_IN = ${PCAP_IN}"
 
diff --git a/example/switch/udp64.pcap b/example/switch/udp64.pcap
deleted file mode 100644
index 
45f9d6e6341a331125e1e3e49ab8ad1e71b20712..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 7624
zcmca|c+)~A1{MYw_+QV!zzF1AIDRVZQX4OW4Ui4OOdthJV3Lu8!IgnQ52VaNFl`SP
zPy-M%&2gOL#31#rG%+bTB{eNQBQq;ICpRy@ps;AvtkLiqO%tPeXtbOdEel8Mj?wyY
zv^_D}W*Ti5GK{vPNBat+eXG&_<7gilID#<RE*xzaj<yR&+l8a;!qKvDbPRcP%zboT
XVRY^UIO8<hE*$M6kM@y?=pzFFfL+O&

diff --git a/pcap/Makefile.am b/pcap/Makefile.am
new file mode 100644
index 0000000..c4770b6
--- /dev/null
+++ b/pcap/Makefile.am
@@ -0,0 +1,3 @@
+EXTRA_DIST = udp64.pcap
+
+dist_bin_SCRIPTS = udp64.pcap
diff --git a/pcap/udp64.pcap b/pcap/udp64.pcap
new file mode 100644
index 
0000000000000000000000000000000000000000..45f9d6e6341a331125e1e3e49ab8ad1e71b20712
GIT binary patch
literal 7624
zcmca|c+)~A1{MYw_+QV!zzF1AIDRVZQX4OW4Ui4OOdthJV3Lu8!IgnQ52VaNFl`SP
zPy-M%&2gOL#31#rG%+bTB{eNQBQq;ICpRy@ps;AvtkLiqO%tPeXtbOdEel8Mj?wyY
zv^_D}W*Ti5GK{vPNBat+eXG&_<7gilID#<RE*xzaj<yR&+l8a;!qKvDbPRcP%zboT
XVRY^UIO8<hE*$M6kM@y?=pzFFfL+O&

literal 0
HcmV?d00001

-- 
2.7.4

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to