diff options
author | Yuval Peress <peress@chromium.org> | 2021-01-15 23:29:00 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-21 17:49:23 +0000 |
commit | ed57bea6f742b57d0314feafa7d4ecce24ab8480 (patch) | |
tree | 6bc5c2877b935b1cd7d2091d5df43a04b198ea5e /include/link_defs.h | |
parent | 542725baca37eaf62be58af9da4a447bd4ba0236 (diff) | |
download | chrome-ec-ed57bea6f742b57d0314feafa7d4ecce24ab8480.tar.gz |
common:test: refactor test_util.h to accommodate Zephyr
This change refactors test functionality in test_util.h to better
accomomdate zTests. This is done by:
* Removing the shim version of test_util.h. This was causing a
conflict that made it harder to tell what's being used. This
involved migrating some needed code over:
- Defining different TASK_PARAMS.
- Defining test_pass for Zephyr tests.
* Creating a macro (DECLARE_EC_TEST) that will automatically
handle creating the individual test functions for both
platform and Zephyr tests.
* Creating a macro (TEST_MAIN) that will automatically handle
creating the main test entry function. This use to be
test_main(void) for Zephyr and run_test(int, char**) for
platform/ec. To do this we'll be removing the int, char**
arguments from platform/ec. This may result in some tests
having to be refactored, but overall should improve the
test codebase as tests should remain deterministic (i.e.
not depend on any outside arguments/parameters).
* Creating some common ztest_ function/macros that will
allow writing platform/ec tests in a zephyr like style.
see test/base32.c for an example.
* Update the type of __shared_mem_buf to match Zephyr. This
was causing an issue now with the full test_util.h in
zephyr/test/system/.
BRANCH=none
BUG=b:168032590
TEST=make runhosttests
TEST=zmake configure --test -B build/host/base32 zephyr/test/base32
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I72173a3e94c7df09a2966e7ffeb9f5668d030f29
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2634401
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Diffstat (limited to 'include/link_defs.h')
-rw-r--r-- | include/link_defs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/link_defs.h b/include/link_defs.h index 4dc71d5f4f..360516eac1 100644 --- a/include/link_defs.h +++ b/include/link_defs.h @@ -106,7 +106,7 @@ extern const void *__irqhandler[]; extern const struct irq_def __irq_data[], __irq_data_end[]; /* Shared memory buffer. Use via shared_mem.h interface. */ -extern uint8_t __shared_mem_buf[]; +extern char __shared_mem_buf[]; /* Image sections used by the TPM2 library */ extern uint8_t *__bss_libtpm2_start; |