[v5,2/8] example: generator: skip execution on unsupported platforms

Message ID 1519297209-16246-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • More tests rework
Related show

Commit Message

Github ODP bot Feb. 22, 2018, 11 a.m.
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: ff7207680d71ef66c6c24fcacdc8597168abbd6b
 **/
 example/generator/Makefile.am      | 3 +++
 example/generator/generator_run.sh | 6 ++++++
 2 files changed, 9 insertions(+)

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=$?