summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Peress <peress@google.com>2022-07-20 06:01:08 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-20 20:23:51 +0000
commited64e30940355ebbc089b4f0b1cf0162a430e97a (patch)
treef7afb1d3b99306518fca5e69419947079f7c32c9
parent56d1f9440b2b07961a7e3e84e7fd4d75f9da5482 (diff)
downloadchrome-ec-ed64e30940355ebbc089b4f0b1cf0162a430e97a.tar.gz
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 <peress@google.com> Change-Id: I80467a6fa6005bdab655e93eaaf68c47a0b324d8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3774888 Reviewed-by: Tristan Honscheid <honscheid@google.com>
-rw-r--r--zephyr/test/math/CMakeLists.txt3
l---------zephyr/test/math/boards/native_posix.overlay1
-rw-r--r--zephyr/test/math/testcase.yaml7
3 files changed, 8 insertions, 3 deletions
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