summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-04-02 07:58:55 -0600
committerchrome-bot <chrome-bot@chromium.org>2019-04-03 18:13:44 -0700
commitbe3906ecf1b75f93c6ac348cff8dbed5fab3d8cd (patch)
treeba7460c618e418830bb48f75b08f5fae66e45620
parent340cc79277df4fe0bb6382b97841659345b5c953 (diff)
downloadchrome-ec-be3906ecf1b75f93c6ac348cff8dbed5fab3d8cd.tar.gz
arcada_ish: ensure tests target builds
Fix the test target for ish which is run during the test phase of chromeos-ish which is not run under buildall in EC codebase. BRANCH=none BUG=b:12237171 TEST=make BOARD=arcada_ish tests builds successfully. FEATURES=test emerge-sarien chromeos-ish now works Change-Id: I6eeaa7a15a5a026b189b67d54f28d994e6a56bb7 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1548503 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r--board/arcada_ish/board.c2
-rw-r--r--core/minute-ia/task.c7
-rw-r--r--include/task_filter.h4
3 files changed, 13 insertions, 0 deletions
diff --git a/board/arcada_ish/board.c b/board/arcada_ish/board.c
index 189897cfdd..22533e0d8c 100644
--- a/board/arcada_ish/board.c
+++ b/board/arcada_ish/board.c
@@ -132,6 +132,7 @@ static void board_init(void)
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
+#ifdef HAS_TASK_CHIPSET
/* TODO(b/122364080): replace when implement real chipset/power task */
int chipset_in_state(int state_mask)
{
@@ -150,6 +151,7 @@ int chipset_in_or_transitioning_to_state(int state_mask)
void chipset_force_shutdown(enum chipset_shutdown_reason reason)
{
}
+#endif /* HAS_TASK_CHIPSET */
/* TODO(b/122364080): remove when implement real chipset/power task */
int board_idle_task(void *unused)
diff --git a/core/minute-ia/task.c b/core/minute-ia/task.c
index 601451d6df..140c6dd85d 100644
--- a/core/minute-ia/task.c
+++ b/core/minute-ia/task.c
@@ -5,6 +5,13 @@
/* Task scheduling / events module for Chrome EC operating system */
+/*
+ * Needed before headers to support test builds since minute-ia defines 5
+ * parameters instead of the normal 4. This specifies a flag value of 0 for all
+ * tests tasks.
+ */
+#define TEST_TASK_EXTRA_ARGS 0
+
#include "atomic.h"
#include "common.h"
#include "console.h"
diff --git a/include/task_filter.h b/include/task_filter.h
index b83b530f52..2cd5e8bbf8 100644
--- a/include/task_filter.h
+++ b/include/task_filter.h
@@ -28,7 +28,11 @@
/* excludes non-base tasks for test build */
#ifdef TEST_BUILD
#define TASK_NOTEST(...)
+#ifdef TEST_TASK_EXTRA_ARGS
+#define TASK_TEST(...) TASK(__VA_ARGS__, TEST_TASK_EXTRA_ARGS)
+#else
#define TASK_TEST TASK
+#endif
#else
#define TASK_NOTEST TASK
#define CONFIG_TEST_TASK_LIST