summaryrefslogtreecommitdiff
path: root/zephyr
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr')
-rw-r--r--zephyr/test/rex/CMakeLists.txt11
-rw-r--r--zephyr/test/rex/Kconfig6
-rw-r--r--zephyr/test/rex/README.md3
-rw-r--r--zephyr/test/rex/boards/native_posix.overlay6
-rw-r--r--zephyr/test/rex/prj.conf11
-rw-r--r--zephyr/test/rex/src/test.c13
-rw-r--r--zephyr/test/rex/testcase.yaml8
7 files changed, 58 insertions, 0 deletions
diff --git a/zephyr/test/rex/CMakeLists.txt b/zephyr/test/rex/CMakeLists.txt
new file mode 100644
index 0000000000..603fcea8f9
--- /dev/null
+++ b/zephyr/test/rex/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Copyright 2022 The ChromiumOS Authors.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+cmake_minimum_required(VERSION 3.13.1)
+find_package(Zephyr REQUIRED HINTS "${ZEPHYR_BASE}")
+project(rex)
+
+zephyr_include_directories("${PLATFORM_EC}/zephyr/projects/rex/include")
+
+target_sources(app PRIVATE src/test.c)
diff --git a/zephyr/test/rex/Kconfig b/zephyr/test/rex/Kconfig
new file mode 100644
index 0000000000..47d2fbe02e
--- /dev/null
+++ b/zephyr/test/rex/Kconfig
@@ -0,0 +1,6 @@
+# Copyright 2022 The ChromiumOS Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+
+source "Kconfig.zephyr"
diff --git a/zephyr/test/rex/README.md b/zephyr/test/rex/README.md
new file mode 100644
index 0000000000..ef1848a627
--- /dev/null
+++ b/zephyr/test/rex/README.md
@@ -0,0 +1,3 @@
+Tests for board specific code under `zephyr/projects/rex/src`.
+
+Run with ./twister -T zephyr/test/rex
diff --git a/zephyr/test/rex/boards/native_posix.overlay b/zephyr/test/rex/boards/native_posix.overlay
new file mode 100644
index 0000000000..b27b199a12
--- /dev/null
+++ b/zephyr/test/rex/boards/native_posix.overlay
@@ -0,0 +1,6 @@
+/* Copyright 2022 The ChromiumOS Authors.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include <board-overlays/native_posix.dts>
diff --git a/zephyr/test/rex/prj.conf b/zephyr/test/rex/prj.conf
new file mode 100644
index 0000000000..89165e36a8
--- /dev/null
+++ b/zephyr/test/rex/prj.conf
@@ -0,0 +1,11 @@
+# Copyright 2022 The ChromiumOS Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+CONFIG_ZTEST=y
+CONFIG_ZTEST_ASSERT_VERBOSE=1
+CONFIG_ZTEST_NEW_API=y
+CONFIG_ASSERT=y
+
+CONFIG_CROS_EC=y
+CONFIG_PLATFORM_EC=y
diff --git a/zephyr/test/rex/src/test.c b/zephyr/test/rex/src/test.c
new file mode 100644
index 0000000000..d86825e74a
--- /dev/null
+++ b/zephyr/test/rex/src/test.c
@@ -0,0 +1,13 @@
+/* Copyright 2022 The ChromiumOS Authors
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include <zephyr/ztest.h>
+
+ZTEST_USER(board_power, test_test)
+{
+ zassert_true(true, NULL, NULL);
+}
+
+ZTEST_SUITE(board_power, NULL, NULL, NULL, NULL, NULL);
diff --git a/zephyr/test/rex/testcase.yaml b/zephyr/test/rex/testcase.yaml
new file mode 100644
index 0000000000..025fe907ee
--- /dev/null
+++ b/zephyr/test/rex/testcase.yaml
@@ -0,0 +1,8 @@
+# Copyright 2022 The ChromiumOS Authors.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+common:
+ platform_allow: native_posix
+tests:
+ rex.default: {}