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:
parent
72f81021b2
commit
fef6e46f01
4 changed files with 38 additions and 0 deletions
9
tests/ztest/base/Kconfig
Normal file
9
tests/ztest/base/Kconfig
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BUGxxxxx
|
||||
bool
|
||||
default y
|
||||
|
||||
source "Kconfig.zephyr"
|
|
@ -35,6 +35,12 @@ ZTEST(framework_tests, test_assert_mem_equal)
|
|||
zassert_mem_equal(actual, expected, sizeof(expected), NULL);
|
||||
}
|
||||
|
||||
ZTEST(framework_tests, test_skip_config)
|
||||
{
|
||||
Z_TEST_SKIP_IFDEF(CONFIG_BUGxxxxx);
|
||||
zassert_true(false, NULL);
|
||||
}
|
||||
|
||||
/***************************************************************************************************
|
||||
* Sample fixture tests
|
||||
**************************************************************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue