summaryrefslogtreecommitdiff
path: root/zephyr/test/drivers/src/main.c
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2021-04-09 10:21:39 -0600
committerCommit Bot <commit-bot@chromium.org>2021-04-12 17:54:21 +0000
commitbd2b1eb38349dcc736c5ec6763abdeb87e48aa16 (patch)
treec1c939743baaa263171c4d5b524f1e4886e5b5ba /zephyr/test/drivers/src/main.c
parentf334d6f9d4116eeb4999293108abf8fe147d6f83 (diff)
downloadchrome-ec-bd2b1eb38349dcc736c5ec6763abdeb87e48aa16.tar.gz
zephyr: Shell of driver ztest.
Create a shell of a test that can have many test suites for device drivers. Currently this test only checks that the EC_BATT_PRES_ODL can be read correctly by battery_is_present(). But it links in many device drivers and is a starting point for the next test. BUG=b:185118990 TEST=It is one BRANCH=none Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I07c8835015cbe0fec6aaf82f782400e894043a90 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2819029 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'zephyr/test/drivers/src/main.c')
-rw-r--r--zephyr/test/drivers/src/main.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/zephyr/test/drivers/src/main.c b/zephyr/test/drivers/src/main.c
new file mode 100644
index 0000000000..7c5113d4ab
--- /dev/null
+++ b/zephyr/test/drivers/src/main.c
@@ -0,0 +1,20 @@
+/* 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 <zephyr.h>
+#include <ztest.h>
+#include "ec_app_main.h"
+
+extern void test_suite_battery(void);
+
+void test_main(void)
+{
+ /* Test suites to run before ec_app_main.*/
+
+ ec_app_main();
+
+ /* Test suites to run after ec_app_main.*/
+ test_suite_battery();
+}