summaryrefslogtreecommitdiff
path: root/zephyr/test/ec_app/src/main.c
blob: 5974b65485483c0ef72e8405488946642d78aeda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/* 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_HOST_INTERFACE_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
}

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_start_ec_tasks));

	ztest_run_test_suite(ec_app_tests);
}