diff options
author | Vic Yang <victoryang@chromium.org> | 2013-04-04 21:38:22 +0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-04-10 01:08:45 -0700 |
commit | 8a06eb1d35cb460fb5669c720262d437f54b0101 (patch) | |
tree | 9a029fc001ed24bf023f89d35b5696926085e539 /include/task_id.h | |
parent | 64ae15f3b3c743a8b98af7754871c0ba7470becd (diff) | |
download | chrome-ec-8a06eb1d35cb460fb5669c720262d437f54b0101.tar.gz |
Only includes necessary tasks for test binaries
This changes current TASK() syntax to TASK_BASE() and TASK_NORMAL(),
where TASK_BASE is necessary for the EC to boot on a board and
TASK_NORMAL represents the task that can be removed in a test binary.
Tasks introduced by a test should be listed as TASK_TEST().
Note that this CL breaks current tests (many of them are broken anyway),
which will be fixed in up coming CLs.
BUG=chrome-os-partner:18598
TEST=Build link/bds/spring/snow/daisy/mccroskey. (mccroskey failed for
unrelated issue)
BRANCH=none
Change-Id: Ic645cdae0906ed21dc473553f1f43c2537ec4bb9
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/47531
Diffstat (limited to 'include/task_id.h')
-rw-r--r-- | include/task_id.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/include/task_id.h b/include/task_id.h index cf359ec6d2..33445aee9c 100644 --- a/include/task_id.h +++ b/include/task_id.h @@ -8,10 +8,27 @@ #ifndef __TASK_ID_H #define __TASK_ID_H +/* excludes non-base tasks for test build */ +#ifdef TEST_BUILD +#define TASK_NOTEST(n, r, d, s) +#define TASK_TEST TASK +#else +#define TASK_NOTEST TASK +#define CONFIG_TEST_TASK_LIST +#endif + +#define TASK_ALWAYS TASK + /* define the name of the header containing the list of tasks */ #define STRINGIFY0(name) #name #define STRINGIFY(name) STRINGIFY0(name) -#define TASK_LIST STRINGIFY(TASKFILE) +#define TEST_TASK_LIST STRINGIFY(TEST_TASKFILE) +#define BOARD_TASK_LIST STRINGIFY(BOARD_TASKFILE) + +#include BOARD_TASK_LIST +#ifdef TEST_BUILD +#include TEST_TASK_LIST +#endif /* Task identifier (8 bits) */ typedef uint8_t task_id_t; @@ -24,11 +41,12 @@ typedef uint8_t task_id_t; * TASK macro in the TASK_LIST file. */ #define TASK(n, r, d, s) TASK_ID_##n, -#include TASK_LIST enum { TASK_ID_IDLE, - /* CONFIG_TASK_LIST is a macro coming from the TASK_LIST file */ + /* CONFIG_TASK_LIST is a macro coming from the BOARD_TASK_LIST file */ CONFIG_TASK_LIST + /* CONFIG_TEST_TASK_LIST is a macro from the TEST_TASK_LIST file */ + CONFIG_TEST_TASK_LIST /* Number of tasks */ TASK_ID_COUNT, /* Special task identifiers */ |