ztest: Add Z_TEST_SKIP_IFDEF macro

Defined Z_TEST_SKIP_IFDEF macro to skip tests when specified
config is enabled.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
This commit is contained in:
Al Semjonovs 2022-04-15 11:59:07 -06:00 committed by Anas Nashif
commit fef6e46f01
4 changed files with 38 additions and 0 deletions

View file

@ -138,6 +138,19 @@ it needs to report either a pass or fail. For example::
ztest_run_test_suite(common);
}
Use the following macro at the start of your test to skip it with a KConfig
option.
#define Z_TEST_SKIP_IFDEF(config)
For example::
void test_test1(void)
{
Z_TEST_SKIP_IFDEF(CONFIG_BUGxxxxx);
zassert_equal(1, 0, NULL);
}
Quick start - Unit testing
**************************