summaryrefslogtreecommitdiff
path: root/zephyr/test
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2020-11-06 14:18:04 -0700
committerCommit Bot <commit-bot@chromium.org>2020-11-09 19:13:17 +0000
commit1b4e189e44379cf1db7639f2549441a8d678a978 (patch)
treeb3e9758c6bc59808cb6e3d11bfc8b3f684795e9c /zephyr/test
parent8141e8d7eeeb915f2b529de39570e2efc8b86466 (diff)
downloadchrome-ec-1b4e189e44379cf1db7639f2549441a8d678a978.tar.gz
zephyr: move from SYS_INIT to main
We are going to need to perform initialization in Zephyr's main before we start the EC tasks or call the INIT hooks. If we rely on SYS_INIT, all of that happens before main is called. BRANCH=none BUG=none TEST=pass tasks unit tests and run on volteer Cq-Depend: chromium:2523462 Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: Icd035695b86fc9690cea88887902be61d9b37a18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523380 Tested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/test')
-rw-r--r--zephyr/test/tasks/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/zephyr/test/tasks/main.c b/zephyr/test/tasks/main.c
index 0c659fd624..59eb7da64e 100644
--- a/zephyr/test/tasks/main.c
+++ b/zephyr/test/tasks/main.c
@@ -4,9 +4,11 @@
*/
#include <kernel.h>
-#include <task.h>
#include <ztest.h>
+#include "ec_tasks.h"
+#include "task.h"
+
/* Second for platform/ec task API (in microseconds). */
#define TASK_SEC(s) (s * 1000 * 1000)
@@ -188,6 +190,9 @@ static void test_empty_set_mask(void)
void test_main(void)
{
+ /* Manually start the EC tasks. This normally happens in main. */
+ start_ec_tasks();
+
ztest_test_suite(test_task_shim,
ztest_unit_test(test_task_get_current),
ztest_unit_test(test_timeout),