ztest: if runid is set, propagate it

define test run id and make it available to ztest. This will be used to
verify we are evaluating the same test we have just built and flashed
and that we are not looking at some old output.

Existing code in ztest will use this, and twister will define the run
id.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2022-04-07 16:08:34 -04:00 committed by Marti Bolivar
commit 1537ee7a0b

View file

@ -5,6 +5,10 @@ zephyr_include_directories(
${ZEPHYR_BASE}/subsys/testsuite/ztest/include
)
if(DEFINED TC_RUNID)
zephyr_compile_definitions(TC_RUNID=${TC_RUNID})
endif()
zephyr_library()
zephyr_library_sources_ifndef(CONFIG_ZTEST_NEW_API src/ztest.c)
zephyr_library_sources_ifdef(CONFIG_ZTEST_NEW_API src/ztest_new.c)