summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2021-01-15 23:29:00 -0700
committerCommit Bot <commit-bot@chromium.org>2021-01-21 17:49:23 +0000
commited57bea6f742b57d0314feafa7d4ecce24ab8480 (patch)
tree6bc5c2877b935b1cd7d2091d5df43a04b198ea5e /.clang-format
parent542725baca37eaf62be58af9da4a447bd4ba0236 (diff)
downloadchrome-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 '.clang-format')
0 files changed, 0 insertions, 0 deletions