tests: kernel: no-multithreading: Use tc_util.h
The comment in this test says that it cannot use ztest, as the latter spawns some threads. However, still format the output in a way compatible with ztest output, by using tc_util.h macros. This is similar to a few other tests which can't use ztest library directly. Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
parent
25a553f800
commit
bb77186cc6
1 changed files with 7 additions and 1 deletions
|
@ -4,15 +4,21 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include <zephyr.h>
|
||||
#include <tc_util.h>
|
||||
|
||||
/* The only point to CONFIG_MULTITHREADING=n is to use Zephyr's
|
||||
* multiplatform toolchain, linkage and boostrap integration to arrive
|
||||
* here so the user can run C code unimpeded. In general, we don't
|
||||
* promise that *any* Zephyr APIs are going to work properly, so don't
|
||||
* try to test any. That means we can't even use the ztest suite
|
||||
* framework (which spawns threads internally).
|
||||
* framework (which spawns threads internally). Instead, just use
|
||||
* tc_util.h helpers.
|
||||
*/
|
||||
void test_main(void)
|
||||
{
|
||||
TC_SUITE_START("test_kernel_no_multithread");
|
||||
TC_START(__func__);
|
||||
printk("It works\n");
|
||||
TC_END_RESULT(TC_PASS);
|
||||
TC_SUITE_END("test_kernel_no_multithread", TC_PASS);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue