diff options
Diffstat (limited to 'zephyr/test/drivers/src/main.c')
-rw-r--r-- | zephyr/test/drivers/src/main.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/zephyr/test/drivers/src/main.c b/zephyr/test/drivers/src/main.c deleted file mode 100644 index 319d42e3ad..0000000000 --- a/zephyr/test/drivers/src/main.c +++ /dev/null @@ -1,38 +0,0 @@ -/* 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/zephyr.h> -#include <ztest.h> -#include "ec_app_main.h" -#include "test/drivers/test_state.h" - -bool drivers_predicate_pre_main(const void *state) -{ - return ((struct test_state *)state)->ec_app_main_run == false; -} - -bool drivers_predicate_post_main(const void *state) -{ - return !drivers_predicate_pre_main(state); -} - -void test_main(void) -{ - struct test_state state = { - .ec_app_main_run = false, - }; - - /* Run all the suites that depend on main not being called yet */ - ztest_run_test_suites(&state); - - ec_app_main(); - state.ec_app_main_run = true; - - /* Run all the suites that depend on main being called */ - ztest_run_test_suites(&state); - - /* Check that every suite ran */ - ztest_verify_all_test_suites_ran(); -} |