Port 6e00ca5e "autotools: define test extensions to skip on valgrind test"

Message ID 1467821531-17618-1-git-send-email-zoltan.kiss@linaro.org
State New
Headers show

Commit Message

Zoltan Kiss July 6, 2016, 4:12 p.m.
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
---
 platform/linux-dpdk/test/Makefile.am        |   2 +-
 platform/linux-dpdk/test/pktio/Makefile.am  |   2 +-
 platform/linux-dpdk/test/pktio/pktio_run    | 111 ----------------------------
 platform/linux-dpdk/test/pktio/pktio_run.sh | 111 ++++++++++++++++++++++++++++
 4 files changed, 113 insertions(+), 113 deletions(-)
 delete mode 100755 platform/linux-dpdk/test/pktio/pktio_run
 create mode 100755 platform/linux-dpdk/test/pktio/pktio_run.sh

Comments

Zoltan Kiss July 7, 2016, 1:50 p.m. | #1
Applied

On 06/07/16 17:12, Zoltan Kiss wrote:
> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
> ---
>   platform/linux-dpdk/test/Makefile.am        |   2 +-
>   platform/linux-dpdk/test/pktio/Makefile.am  |   2 +-
>   platform/linux-dpdk/test/pktio/pktio_run    | 111 ----------------------------
>   platform/linux-dpdk/test/pktio/pktio_run.sh | 111 ++++++++++++++++++++++++++++
>   4 files changed, 113 insertions(+), 113 deletions(-)
>   delete mode 100755 platform/linux-dpdk/test/pktio/pktio_run
>   create mode 100755 platform/linux-dpdk/test/pktio/pktio_run.sh
>
> diff --git a/platform/linux-dpdk/test/Makefile.am b/platform/linux-dpdk/test/Makefile.am
> index 55d8914..a2edf0c 100644
> --- a/platform/linux-dpdk/test/Makefile.am
> +++ b/platform/linux-dpdk/test/Makefile.am
> @@ -4,7 +4,7 @@ TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/validation
>   ODP_MODULES = pktio
>
>   if test_vald
> -TESTS = pktio/pktio_run \
> +TESTS = pktio/pktio_run.sh \
>   	${top_builddir}/test/validation/atomic/atomic_main$(EXEEXT) \
>   	${top_builddir}/test/validation/barrier/barrier_main$(EXEEXT) \
>   	${top_builddir}/test/validation/buffer/buffer_main$(EXEEXT) \
> diff --git a/platform/linux-dpdk/test/pktio/Makefile.am b/platform/linux-dpdk/test/pktio/Makefile.am
> index 963d5fa..e401a29 100644
> --- a/platform/linux-dpdk/test/pktio/Makefile.am
> +++ b/platform/linux-dpdk/test/pktio/Makefile.am
> @@ -1,4 +1,4 @@
>   dist_check_SCRIPTS = pktio_env \
> -		     pktio_run
> +		     pktio_run.sh
>
>   test_SCRIPTS = $(dist_check_SCRIPTS)
> diff --git a/platform/linux-dpdk/test/pktio/pktio_run b/platform/linux-dpdk/test/pktio/pktio_run
> deleted file mode 100755
> index 58fcde1..0000000
> --- a/platform/linux-dpdk/test/pktio/pktio_run
> +++ /dev/null
> @@ -1,111 +0,0 @@
> -#!/bin/sh
> -#
> -# Copyright (c) 2015, Linaro Limited
> -# All rights reserved.
> -#
> -# SPDX-License-Identifier:	BSD-3-Clause
> -#
> -
> -# Proceed the pktio tests. This script expects at least one argument:
> -#	setup)   setup the pktio test environment
> -#	cleanup) cleanup the pktio test environment
> -#	run)     run the pktio tests (setup, run, cleanup)
> -# extra arguments are passed unchanged to the test itself (pktio_main)
> -# Without arguments, "run" is assumed and no extra argument is passed to the
> -# test (legacy mode).
> -#
> -
> -# 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 (./pktio_run) 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: $pktio_run_path"
> -else
> -	echo "cannot find pktio_main: please set you PATH for it."
> -fi
> -
> -# directory where platform test sources are, including scripts
> -TEST_SRC_DIR=$(dirname $0)
> -
> -# exit codes expected by automake for skipped tests
> -TEST_SKIPPED=77
> -
> -# Use installed pktio env or for make check take it from platform directory
> -if [ -f "./pktio_env" ]; then
> -	. ./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 directory or in platform/\$ODP_PLATFORM/test."
> -	echo "ODP_PLATFORM=\"$ODP_PLATFORM\""
> -	exit 1
> -fi
> -
> -run_test()
> -{
> -	local ret=0
> -
> -	pktio_main${EXEEXT} $*
> -	if [ $? -ne 0 ]; then
> -		ret=1
> -	fi
> -	if [ $ret -ne 0 ]; then
> -		echo "!!! FAILED !!!"
> -	fi
> -
> -	return $ret
> -}
> -
> -run()
> -{
> -	echo "pktio: using 'loop' device"
> -	pktio_main${EXEEXT} $*
> -	loop_ret=$?
> -
> -	# need to be root to run tests with real interfaces
> -	if [ "$(id -u)" != "0" ]; then
> -		exit $ret
> -	fi
> -
> -	if [ "$ODP_PKTIO_IF0" = "" ]; then
> -		# no interfaces specified, use default veth interfaces
> -		# setup by the pktio_env script
> -		setup_pktio_env clean
> -		if [ $? != 0 ]; then
> -			echo "Failed to setup test environment, skipping test."
> -			exit $TEST_SKIPPED
> -		fi
> -		export ODP_PLATFORM_PARAMS="-n 4 --vdev eth_pcap0,iface=$IF0 --vdev eth_pcap1,iface=$IF1"
> -		export ODP_PKTIO_IF0=0
> -		export ODP_PKTIO_IF1=1
> -	fi
> -
> -	run_test
> -	ret=$?
> -
> -	[ $ret = 0 ] && ret=$loop_ret
> -
> -	exit $ret
> -}
> -
> -if [ $# != 0 ]; then
> -	action=$1
> -	shift
> -fi
> -
> -case "$action" in
> -	setup)   setup_pktio_env   ;;
> -	cleanup) cleanup_pktio_env ;;
> -	run)     run ;;
> -	*)       run ;;
> -esac
> diff --git a/platform/linux-dpdk/test/pktio/pktio_run.sh b/platform/linux-dpdk/test/pktio/pktio_run.sh
> new file mode 100755
> index 0000000..58fcde1
> --- /dev/null
> +++ b/platform/linux-dpdk/test/pktio/pktio_run.sh
> @@ -0,0 +1,111 @@
> +#!/bin/sh
> +#
> +# Copyright (c) 2015, Linaro Limited
> +# All rights reserved.
> +#
> +# SPDX-License-Identifier:	BSD-3-Clause
> +#
> +
> +# Proceed the pktio tests. This script expects at least one argument:
> +#	setup)   setup the pktio test environment
> +#	cleanup) cleanup the pktio test environment
> +#	run)     run the pktio tests (setup, run, cleanup)
> +# extra arguments are passed unchanged to the test itself (pktio_main)
> +# Without arguments, "run" is assumed and no extra argument is passed to the
> +# test (legacy mode).
> +#
> +
> +# 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 (./pktio_run) 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: $pktio_run_path"
> +else
> +	echo "cannot find pktio_main: please set you PATH for it."
> +fi
> +
> +# directory where platform test sources are, including scripts
> +TEST_SRC_DIR=$(dirname $0)
> +
> +# exit codes expected by automake for skipped tests
> +TEST_SKIPPED=77
> +
> +# Use installed pktio env or for make check take it from platform directory
> +if [ -f "./pktio_env" ]; then
> +	. ./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 directory or in platform/\$ODP_PLATFORM/test."
> +	echo "ODP_PLATFORM=\"$ODP_PLATFORM\""
> +	exit 1
> +fi
> +
> +run_test()
> +{
> +	local ret=0
> +
> +	pktio_main${EXEEXT} $*
> +	if [ $? -ne 0 ]; then
> +		ret=1
> +	fi
> +	if [ $ret -ne 0 ]; then
> +		echo "!!! FAILED !!!"
> +	fi
> +
> +	return $ret
> +}
> +
> +run()
> +{
> +	echo "pktio: using 'loop' device"
> +	pktio_main${EXEEXT} $*
> +	loop_ret=$?
> +
> +	# need to be root to run tests with real interfaces
> +	if [ "$(id -u)" != "0" ]; then
> +		exit $ret
> +	fi
> +
> +	if [ "$ODP_PKTIO_IF0" = "" ]; then
> +		# no interfaces specified, use default veth interfaces
> +		# setup by the pktio_env script
> +		setup_pktio_env clean
> +		if [ $? != 0 ]; then
> +			echo "Failed to setup test environment, skipping test."
> +			exit $TEST_SKIPPED
> +		fi
> +		export ODP_PLATFORM_PARAMS="-n 4 --vdev eth_pcap0,iface=$IF0 --vdev eth_pcap1,iface=$IF1"
> +		export ODP_PKTIO_IF0=0
> +		export ODP_PKTIO_IF1=1
> +	fi
> +
> +	run_test
> +	ret=$?
> +
> +	[ $ret = 0 ] && ret=$loop_ret
> +
> +	exit $ret
> +}
> +
> +if [ $# != 0 ]; then
> +	action=$1
> +	shift
> +fi
> +
> +case "$action" in
> +	setup)   setup_pktio_env   ;;
> +	cleanup) cleanup_pktio_env ;;
> +	run)     run ;;
> +	*)       run ;;
> +esac
>

Patch hide | download patch | download mbox

diff --git a/platform/linux-dpdk/test/Makefile.am b/platform/linux-dpdk/test/Makefile.am
index 55d8914..a2edf0c 100644
--- a/platform/linux-dpdk/test/Makefile.am
+++ b/platform/linux-dpdk/test/Makefile.am
@@ -4,7 +4,7 @@  TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/validation
 ODP_MODULES = pktio
 
 if test_vald
-TESTS = pktio/pktio_run \
+TESTS = pktio/pktio_run.sh \
 	${top_builddir}/test/validation/atomic/atomic_main$(EXEEXT) \
 	${top_builddir}/test/validation/barrier/barrier_main$(EXEEXT) \
 	${top_builddir}/test/validation/buffer/buffer_main$(EXEEXT) \
diff --git a/platform/linux-dpdk/test/pktio/Makefile.am b/platform/linux-dpdk/test/pktio/Makefile.am
index 963d5fa..e401a29 100644
--- a/platform/linux-dpdk/test/pktio/Makefile.am
+++ b/platform/linux-dpdk/test/pktio/Makefile.am
@@ -1,4 +1,4 @@ 
 dist_check_SCRIPTS = pktio_env \
-		     pktio_run
+		     pktio_run.sh
 
 test_SCRIPTS = $(dist_check_SCRIPTS)
diff --git a/platform/linux-dpdk/test/pktio/pktio_run b/platform/linux-dpdk/test/pktio/pktio_run
deleted file mode 100755
index 58fcde1..0000000
--- a/platform/linux-dpdk/test/pktio/pktio_run
+++ /dev/null
@@ -1,111 +0,0 @@ 
-#!/bin/sh
-#
-# Copyright (c) 2015, Linaro Limited
-# All rights reserved.
-#
-# SPDX-License-Identifier:	BSD-3-Clause
-#
-
-# Proceed the pktio tests. This script expects at least one argument:
-#	setup)   setup the pktio test environment
-#	cleanup) cleanup the pktio test environment
-#	run)     run the pktio tests (setup, run, cleanup)
-# extra arguments are passed unchanged to the test itself (pktio_main)
-# Without arguments, "run" is assumed and no extra argument is passed to the
-# test (legacy mode).
-#
-
-# 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 (./pktio_run) 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: $pktio_run_path"
-else
-	echo "cannot find pktio_main: please set you PATH for it."
-fi
-
-# directory where platform test sources are, including scripts
-TEST_SRC_DIR=$(dirname $0)
-
-# exit codes expected by automake for skipped tests
-TEST_SKIPPED=77
-
-# Use installed pktio env or for make check take it from platform directory
-if [ -f "./pktio_env" ]; then
-	. ./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 directory or in platform/\$ODP_PLATFORM/test."
-	echo "ODP_PLATFORM=\"$ODP_PLATFORM\""
-	exit 1
-fi
-
-run_test()
-{
-	local ret=0
-
-	pktio_main${EXEEXT} $*
-	if [ $? -ne 0 ]; then
-		ret=1
-	fi
-	if [ $ret -ne 0 ]; then
-		echo "!!! FAILED !!!"
-	fi
-
-	return $ret
-}
-
-run()
-{
-	echo "pktio: using 'loop' device"
-	pktio_main${EXEEXT} $*
-	loop_ret=$?
-
-	# need to be root to run tests with real interfaces
-	if [ "$(id -u)" != "0" ]; then
-		exit $ret
-	fi
-
-	if [ "$ODP_PKTIO_IF0" = "" ]; then
-		# no interfaces specified, use default veth interfaces
-		# setup by the pktio_env script
-		setup_pktio_env clean
-		if [ $? != 0 ]; then
-			echo "Failed to setup test environment, skipping test."
-			exit $TEST_SKIPPED
-		fi
-		export ODP_PLATFORM_PARAMS="-n 4 --vdev eth_pcap0,iface=$IF0 --vdev eth_pcap1,iface=$IF1"
-		export ODP_PKTIO_IF0=0
-		export ODP_PKTIO_IF1=1
-	fi
-
-	run_test
-	ret=$?
-
-	[ $ret = 0 ] && ret=$loop_ret
-
-	exit $ret
-}
-
-if [ $# != 0 ]; then
-	action=$1
-	shift
-fi
-
-case "$action" in
-	setup)   setup_pktio_env   ;;
-	cleanup) cleanup_pktio_env ;;
-	run)     run ;;
-	*)       run ;;
-esac
diff --git a/platform/linux-dpdk/test/pktio/pktio_run.sh b/platform/linux-dpdk/test/pktio/pktio_run.sh
new file mode 100755
index 0000000..58fcde1
--- /dev/null
+++ b/platform/linux-dpdk/test/pktio/pktio_run.sh
@@ -0,0 +1,111 @@ 
+#!/bin/sh
+#
+# Copyright (c) 2015, Linaro Limited
+# All rights reserved.
+#
+# SPDX-License-Identifier:	BSD-3-Clause
+#
+
+# Proceed the pktio tests. This script expects at least one argument:
+#	setup)   setup the pktio test environment
+#	cleanup) cleanup the pktio test environment
+#	run)     run the pktio tests (setup, run, cleanup)
+# extra arguments are passed unchanged to the test itself (pktio_main)
+# Without arguments, "run" is assumed and no extra argument is passed to the
+# test (legacy mode).
+#
+
+# 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 (./pktio_run) 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: $pktio_run_path"
+else
+	echo "cannot find pktio_main: please set you PATH for it."
+fi
+
+# directory where platform test sources are, including scripts
+TEST_SRC_DIR=$(dirname $0)
+
+# exit codes expected by automake for skipped tests
+TEST_SKIPPED=77
+
+# Use installed pktio env or for make check take it from platform directory
+if [ -f "./pktio_env" ]; then
+	. ./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 directory or in platform/\$ODP_PLATFORM/test."
+	echo "ODP_PLATFORM=\"$ODP_PLATFORM\""
+	exit 1
+fi
+
+run_test()
+{
+	local ret=0
+
+	pktio_main${EXEEXT} $*
+	if [ $? -ne 0 ]; then
+		ret=1
+	fi
+	if [ $ret -ne 0 ]; then
+		echo "!!! FAILED !!!"
+	fi
+
+	return $ret
+}
+
+run()
+{
+	echo "pktio: using 'loop' device"
+	pktio_main${EXEEXT} $*
+	loop_ret=$?
+
+	# need to be root to run tests with real interfaces
+	if [ "$(id -u)" != "0" ]; then
+		exit $ret
+	fi
+
+	if [ "$ODP_PKTIO_IF0" = "" ]; then
+		# no interfaces specified, use default veth interfaces
+		# setup by the pktio_env script
+		setup_pktio_env clean
+		if [ $? != 0 ]; then
+			echo "Failed to setup test environment, skipping test."
+			exit $TEST_SKIPPED
+		fi
+		export ODP_PLATFORM_PARAMS="-n 4 --vdev eth_pcap0,iface=$IF0 --vdev eth_pcap1,iface=$IF1"
+		export ODP_PKTIO_IF0=0
+		export ODP_PKTIO_IF1=1
+	fi
+
+	run_test
+	ret=$?
+
+	[ $ret = 0 ] && ret=$loop_ret
+
+	exit $ret
+}
+
+if [ $# != 0 ]; then
+	action=$1
+	shift
+fi
+
+case "$action" in
+	setup)   setup_pktio_env   ;;
+	cleanup) cleanup_pktio_env ;;
+	run)     run ;;
+	*)       run ;;
+esac