From ed64e30940355ebbc089b4f0b1cf0162a430e97a Mon Sep 17 00:00:00 2001 From: Yuval Peress Date: Wed, 20 Jul 2022 06:01:08 -0600 Subject: test: math: support twister builds Add support for twister builds via a symlink to the native_posix overlay and a testcase.yaml BRANCH=none BUG=none TEST=Run twister with -T zephyr/test/math Signed-off-by: Yuval Peress Change-Id: I80467a6fa6005bdab655e93eaaf68c47a0b324d8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3774888 Reviewed-by: Tristan Honscheid --- zephyr/test/math/CMakeLists.txt | 3 --- zephyr/test/math/boards/native_posix.overlay | 1 + zephyr/test/math/testcase.yaml | 7 +++++++ 3 files changed, 8 insertions(+), 3 deletions(-) create mode 120000 zephyr/test/math/boards/native_posix.overlay create mode 100644 zephyr/test/math/testcase.yaml diff --git a/zephyr/test/math/CMakeLists.txt b/zephyr/test/math/CMakeLists.txt index e90ce4cf8c..c540ece71d 100644 --- a/zephyr/test/math/CMakeLists.txt +++ b/zephyr/test/math/CMakeLists.txt @@ -6,9 +6,6 @@ cmake_minimum_required(VERSION 3.13.1) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) project(math) -zephyr_include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") -zephyr_include_directories("${PLATFORM_EC}/include") - target_sources(app PRIVATE ${PLATFORM_EC}/common/math_util.c) target_sources( diff --git a/zephyr/test/math/boards/native_posix.overlay b/zephyr/test/math/boards/native_posix.overlay new file mode 120000 index 0000000000..7b75ea9967 --- /dev/null +++ b/zephyr/test/math/boards/native_posix.overlay @@ -0,0 +1 @@ +../../../dts/board-overlays/native_posix.dts \ No newline at end of file diff --git a/zephyr/test/math/testcase.yaml b/zephyr/test/math/testcase.yaml new file mode 100644 index 0000000000..cd33e70553 --- /dev/null +++ b/zephyr/test/math/testcase.yaml @@ -0,0 +1,7 @@ +common: + platform_allow: native_posix +tests: + util.math.fixed_point: + extra_args: OVERLAY_CONFIG=./fixed_point.conf + util.math.floating_point: + extra_args: OVERLAY_CONFIG=./floating_point.conf -- cgit v1.2.1