diff mbox

[2/2] linux-generic: test: move pktio_env to common dir

Message ID 1462928831-21055-2-git-send-email-mike.holmes@linaro.org
State New
Headers show

Commit Message

Mike Holmes May 11, 2016, 1:07 a.m. UTC
pktio_env is used more widely than by just pktio testing.
Move it to a more central location removing the need for a special case
for performance tests where the pktio dir has to be traversed during
build even when the directory is not used.

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 platform/linux-generic/test/Makefile.am           | 7 +------
 platform/linux-generic/test/pktio/Makefile.am     | 3 +--
 platform/linux-generic/test/pktio/pktio_run       | 4 ++--
 platform/linux-generic/test/{pktio => }/pktio_env | 0
 test/performance/odp_l2fwd_run                    | 4 ++--
 5 files changed, 6 insertions(+), 12 deletions(-)
 rename platform/linux-generic/test/{pktio => }/pktio_env (100%)
diff mbox

Patch

diff --git a/platform/linux-generic/test/Makefile.am b/platform/linux-generic/test/Makefile.am
index 05998e3..1696314 100644
--- a/platform/linux-generic/test/Makefile.am
+++ b/platform/linux-generic/test/Makefile.am
@@ -52,7 +52,7 @@  TESTS += pktio/pktio_run_dpdk
 endif
 endif
 
-dist_check_SCRIPTS = run-test tests-validation.env $(LOG_COMPILER)
+dist_check_SCRIPTS = pktio_env run-test tests-validation.env $(LOG_COMPILER)
 
 test_SCRIPTS = $(dist_check_SCRIPTS)
 
@@ -65,8 +65,3 @@  if test_installdir
 installcheck-local:
 	$(DESTDIR)/$(testdir)/run-test
 endif
-
-#performance tests refer to pktio_env
-if test_perf
-SUBDIRS = pktio
-endif
diff --git a/platform/linux-generic/test/pktio/Makefile.am b/platform/linux-generic/test/pktio/Makefile.am
index 3dcc1ee..0fed964 100644
--- a/platform/linux-generic/test/pktio/Makefile.am
+++ b/platform/linux-generic/test/pktio/Makefile.am
@@ -1,5 +1,4 @@ 
-dist_check_SCRIPTS = pktio_env \
-		     pktio_run \
+dist_check_SCRIPTS = pktio_run \
 		     pktio_run_tap
 
 if HAVE_PCAP
diff --git a/platform/linux-generic/test/pktio/pktio_run b/platform/linux-generic/test/pktio/pktio_run
index 774a616..82d8642 100755
--- a/platform/linux-generic/test/pktio/pktio_run
+++ b/platform/linux-generic/test/pktio/pktio_run
@@ -36,8 +36,8 @@  PKTIO_ENV="$(which pktio_env)"
 
 if [ -f "${PKTIO_ENV}" ]; then
 	. ${PKTIO_ENV}
-elif [ -f ${TEST_SRC_DIR}/pktio_env ]; then
-	. ${TEST_SRC_DIR}/pktio_env
+elif [ -f ${TEST_SRC_DIR}/../pktio_env ]; then
+	. ${TEST_SRC_DIR}/../pktio_env
 else
 	echo "BUG: unable to find pktio_env!"
 	echo "pktio_env has to be in current path or in platform/\$ODP_PLATFORM/test"
diff --git a/platform/linux-generic/test/pktio/pktio_env b/platform/linux-generic/test/pktio_env
similarity index 100%
rename from platform/linux-generic/test/pktio/pktio_env
rename to platform/linux-generic/test/pktio_env
diff --git a/test/performance/odp_l2fwd_run b/test/performance/odp_l2fwd_run
index cab97a8..2aa9814 100755
--- a/test/performance/odp_l2fwd_run
+++ b/test/performance/odp_l2fwd_run
@@ -37,8 +37,8 @@  elif  [ "$ODP_PLATFORM" = "" ]; then
 	echo "$0: error: ODP_PLATFORM must be defined"
 	# not skipped as this should never happen via "make check"
 	exit 1
-elif [ -f ${TEST_SRC_DIR}/../../platform/$ODP_PLATFORM/test/pktio/pktio_env ]; then
-	. ${TEST_SRC_DIR}/../../platform/$ODP_PLATFORM/test/pktio/pktio_env
+elif [ -f ${TEST_SRC_DIR}/../../platform/$ODP_PLATFORM/test/pktio_env ]; then
+	. ${TEST_SRC_DIR}/../../platform/$ODP_PLATFORM/test/pktio_env
 else
 	echo "BUG: unable to find pktio_env!"
 	echo "pktio_env has to be in current directory or in platform/\$ODP_PLATFORM/test."