diff mbox series

[v1,2/7] example: generator: skip execution on unsupported platforms

Message ID 1519290010-13383-3-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [v1,1/7] Revert "example: generator move to platform tests" | expand

Commit Message

Github ODP bot Feb. 22, 2018, 9 a.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


null: pktio class is not a part of ABI, so it might be unsupported on
some of platforms. Add condition guarding execution of this example only
on supported platforms.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 496 (lumag:tests-fix-2)
 ** https://github.com/Linaro/odp/pull/496
 ** Patch: https://github.com/Linaro/odp/pull/496.patch
 ** Base sha: 5a58bbf2bb331fd7dde2ebbc0430634ace6900fb
 ** Merge commit sha: 2ca48deb89c7ac000bd44a1da037c36de66720cb
 **/
 example/generator/Makefile.am      | 3 +++
 example/generator/generator_run.sh | 6 ++++++
 2 files changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/example/generator/Makefile.am b/example/generator/Makefile.am
index 63f4ae608..cd2383187 100644
--- a/example/generator/Makefile.am
+++ b/example/generator/Makefile.am
@@ -4,7 +4,10 @@  bin_PROGRAMS = odp_generator
 
 odp_generator_SOURCES = odp_generator.c
 
+TEST_EXTENSIONS = .sh
+
 if test_example
 TESTS = generator_run.sh
+TESTS_ENVIRONMENT += ODP_PLATFORM=$(with_platform)
 endif
 EXTRA_DIST = generator_run.sh
diff --git a/example/generator/generator_run.sh b/example/generator/generator_run.sh
index 2d741a8d1..3d8ac0e98 100755
--- a/example/generator/generator_run.sh
+++ b/example/generator/generator_run.sh
@@ -6,6 +6,12 @@ 
 # SPDX-License-Identifier:     BSD-3-Clause
 #
 
+if [ -n "${ODP_PLATFORM}" -a "x${ODP_PLATFORM}" != "xlinux-generic" ]
+then
+	echo "Skipping test on probably unsupported platform"
+	exit 77
+fi
+
 ./odp_generator${EXEEXT} -w 1 -n 1 -I null:0 -m u
 STATUS=$?