diff options
Diffstat (limited to 'zephyr/test/ec_app')
-rw-r--r-- | zephyr/test/ec_app/CMakeLists.txt | 10 | ||||
-rw-r--r-- | zephyr/test/ec_app/prj.conf | 7 | ||||
-rw-r--r-- | zephyr/test/ec_app/src/main.c | 127 | ||||
-rw-r--r-- | zephyr/test/ec_app/zmake.yaml | 12 |
4 files changed, 0 insertions, 156 deletions
diff --git a/zephyr/test/ec_app/CMakeLists.txt b/zephyr/test/ec_app/CMakeLists.txt deleted file mode 100644 index 8ee9a554a7..0000000000 --- a/zephyr/test/ec_app/CMakeLists.txt +++ /dev/null @@ -1,10 +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. - -cmake_minimum_required(VERSION 3.13.1) -find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) -project(ec_app) - -FILE(GLOB app_sources src/*.c) -target_sources(app PRIVATE ${app_sources}) diff --git a/zephyr/test/ec_app/prj.conf b/zephyr/test/ec_app/prj.conf deleted file mode 100644 index b398d0dd8c..0000000000 --- a/zephyr/test/ec_app/prj.conf +++ /dev/null @@ -1,7 +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. - -CONFIG_ZTEST=y -CONFIG_PLATFORM_EC=y -CONFIG_CROS_EC=y diff --git a/zephyr/test/ec_app/src/main.c b/zephyr/test/ec_app/src/main.c deleted file mode 100644 index 6aa2d6c1b9..0000000000 --- a/zephyr/test/ec_app/src/main.c +++ /dev/null @@ -1,127 +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 <ztest.h> -#include "ec_app_main.h" -#include "hooks.h" - -static void test_init_reset_log(void) -{ -#ifdef CONFIG_CMD_AP_RESET_LOG - zassert_unreachable("TODO: Implement this test."); -#else - ztest_test_skip(); -#endif -} - -static void test_lpc_init_mask(void) -{ -#ifdef CONFIG_HOSTCMD_X86 - zassert_unreachable("TODO: Implement this test."); -#else - ztest_test_skip(); -#endif -} - -static void test_keyboard_scan_init(void) -{ -#ifdef HAS_TASK_KEYSCAN - zassert_unreachable("TODO: Implement this test."); -#else - ztest_test_skip(); -#endif -} - -static void test_button_init(void) -{ -#if defined(CONFIG_DEDICATED_RECOVERY_BUTTON) || defined(CONFIG_VOLUME_BUTTONS) - zassert_unreachable("TODO: Implement this test."); -#else - ztest_test_skip(); -#endif -} - -static void test_setup_espi(void) -{ -#ifdef CONFIG_PLATFORM_EC_ESPI - zassert_unreachable("TODO: Implement this test."); -#else - ztest_test_skip(); -#endif -} - -static void test_watchdog_init(void) -{ -#ifdef CONFIG_PLATFORM_EC_WATCHDOG - zassert_unreachable("TODO: Implement this test."); -#else - ztest_test_skip(); -#endif -} - -static void test_vboot_main(void) -{ -#ifdef CONFIG_PLATFORM_EC_VBOOT_EFS2 - zassert_unreachable("TODO: Implement this test."); -#else - ztest_test_skip(); -#endif -} - -#ifdef CONFIG_PLATFORM_EC_HOOKS -static int sample_init_hook_count; -/** - * Just a sample hook. - */ -static void sample_init_hook(void) -{ - printk("Running hook.\n"); - sample_init_hook_count++; -} -DECLARE_HOOK(HOOK_INIT, sample_init_hook, HOOK_PRIO_DEFAULT); - -/** - * @brief Test EC App main runs hooks of type HOOK_INIT. - * - * This test installs a hook, runs main and verifies that the hook ran. - * - */ -static void test_hook_notify_init(void) -{ - sample_init_hook_count = 0; - ec_app_main(); - zassert_equal(1, sample_init_hook_count, - "Expected sample_init_hook to run once."); -} -#else -static void test_hook_notify_init(void) -{ - ztest_test_skip(); -} -#endif - -static void test_start_ec_tasks(void) -{ -#ifdef CONFIG_SHIMMED_TASKS - zassert_unreachable("TODO: Implement this test."); -#else - ztest_test_skip(); -#endif -} - -void test_main(void) -{ - ztest_test_suite(ec_app_tests, ztest_unit_test(test_init_reset_log), - ztest_unit_test(test_lpc_init_mask), - ztest_unit_test(test_keyboard_scan_init), - ztest_unit_test(test_button_init), - ztest_unit_test(test_setup_espi), - ztest_unit_test(test_watchdog_init), - ztest_unit_test(test_vboot_main), - ztest_unit_test(test_hook_notify_init), - ztest_unit_test(test_start_ec_tasks)); - - ztest_run_test_suite(ec_app_tests); -} diff --git a/zephyr/test/ec_app/zmake.yaml b/zephyr/test/ec_app/zmake.yaml deleted file mode 100644 index decc749ae1..0000000000 --- a/zephyr/test/ec_app/zmake.yaml +++ /dev/null @@ -1,12 +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. - -board: native_posix -supported-zephyr-versions: - - v2.6 -supported-toolchains: - - llvm - - host -output-type: elf -is-test: true |