summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Peress <peress@google.com>2021-10-11 09:44:29 -0600
committerCommit Bot <commit-bot@chromium.org>2021-10-11 18:30:21 +0000
commit9479cb8807662c76691529213b69233bef938197 (patch)
treeff6111382ac82ff3113c2758d27f891b3d6c7ba1
parent5e2da99382fce9f615a36dae2c46764d0d1c9764 (diff)
downloadchrome-ec-9479cb8807662c76691529213b69233bef938197.tar.gz
zephyr: test: Add syv682x test using syv682c
Add Herobrine specific test for syv682c BRANCH=none BUG=b:202727833 TEST=zmake configure --test zephyr/test/drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I79642f4e6d6d70964f1ac601a16220c07a3cb46a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3216415 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
-rw-r--r--zephyr/test/drivers/prj.conf4
-rw-r--r--zephyr/test/drivers/src/main.c2
-rw-r--r--zephyr/test/drivers/src/ppc_syv682c.c21
3 files changed, 27 insertions, 0 deletions
diff --git a/zephyr/test/drivers/prj.conf b/zephyr/test/drivers/prj.conf
index 5d6fb6e0da..e0fc1b9233 100644
--- a/zephyr/test/drivers/prj.conf
+++ b/zephyr/test/drivers/prj.conf
@@ -94,3 +94,7 @@ CONFIG_PLATFORM_EC_SWITCH=n
CONFIG_PLATFORM_EC_VBOOT_HASH=n
CONFIG_PLATFORM_EC_POWERSEQ_INTEL=n
CONFIG_PLATFORM_EC_POWERSEQ_PP5000_CONTROL=n
+
+# USB-C
+CONFIG_PLATFORM_EC_USBC_PPC_SYV682C=y
+CONFIG_PLATFORM_EC_USBC_PPC_SYV682X=y
diff --git a/zephyr/test/drivers/src/main.c b/zephyr/test/drivers/src/main.c
index f4e7351c91..979dffea0a 100644
--- a/zephyr/test/drivers/src/main.c
+++ b/zephyr/test/drivers/src/main.c
@@ -25,6 +25,7 @@ extern void test_suite_lis2dw12(void);
extern void test_suite_stm_mems_common(void);
extern void test_suite_isl923x(void);
extern void test_suite_usb_mux(void);
+extern void test_suite_ppc_syv682c(void);
void test_main(void)
{
@@ -51,4 +52,5 @@ void test_main(void)
test_suite_stm_mems_common();
test_suite_isl923x();
test_suite_usb_mux();
+ test_suite_ppc_syv682c();
}
diff --git a/zephyr/test/drivers/src/ppc_syv682c.c b/zephyr/test/drivers/src/ppc_syv682c.c
new file mode 100644
index 0000000000..ab05cc37cf
--- /dev/null
+++ b/zephyr/test/drivers/src/ppc_syv682c.c
@@ -0,0 +1,21 @@
+/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include <ztest.h>
+
+#include "syv682x.h"
+
+static void test_board_is_syv682c(void)
+{
+ zassert_true(syv682x_board_is_syv682c(0), NULL);
+}
+
+void test_suite_ppc_syv682c(void)
+{
+ ztest_test_suite(
+ ppc_syv682c,
+ ztest_unit_test(test_board_is_syv682c));
+ ztest_run_test_suite(ppc_syv682c);
+} \ No newline at end of file