tests: add CONFIG_TEST for marking tests
Mark tests with CONFIG_TEST to allow for test specific setup and configuration. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
33592e8aa8
commit
829598be2b
|
@ -1 +1,5 @@
|
|||
add_subdirectory_if_kconfig(ztest)
|
||||
|
||||
zephyr_include_directories_ifdef(CONFIG_TEST
|
||||
$ENV{ZEPHYR_BASE}/tests/include
|
||||
)
|
||||
|
|
|
@ -8,6 +8,13 @@ menu Testing
|
|||
|
||||
source "tests/ztest/Kconfig"
|
||||
|
||||
config TEST
|
||||
bool "Mark project as a test"
|
||||
default n
|
||||
help
|
||||
Mark a project or an application as a test. This will enable a few
|
||||
test defaults.
|
||||
|
||||
config TEST_EXTRA_STACKSIZE
|
||||
int "Test function thread stack size"
|
||||
default 0
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
# all printf, fprintf to stdout go to console
|
||||
CONFIG_STDOUT_CONSOLE=y
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
# all printf, fprintf to stdout go to console
|
||||
CONFIG_STDOUT_CONSOLE=y
|
||||
CONFIG_MAIN_THREAD_PRIORITY=6
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_PERFORMANCE_METRICS=y
|
||||
CONFIG_BOOT_TIME_MEASUREMENT=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
|
|
|
@ -7,6 +7,8 @@ macro(set_conf_file)
|
|||
set(CONF_FILE $ENV{ZEPHYR_BASE}/tests/benchmarks/footprint/${TEST}/${BOARD}.conf)
|
||||
elseif(EXISTS $ENV{ZEPHYR_BASE}/tests/benchmarks/footprint/${TEST}/${ARCH}.conf)
|
||||
set(CONF_FILE $ENV{ZEPHYR_BASE}/tests/benchmarks/footprint/${TEST}/${ARCH}.conf)
|
||||
else()
|
||||
set(CONF_FILE $ENV{ZEPHYR_BASE}/tests/benchmarks/footprint/prj.conf)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=2048
|
||||
CONFIG_MAIN_STACK_SIZE=1024
|
||||
CONFIG_COMMAND_STACK_SIZE=64
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=2048
|
||||
CONFIG_MAIN_STACK_SIZE=1024
|
||||
CONFIG_COMMAND_STACK_SIZE=64
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=2048
|
||||
CONFIG_MAIN_STACK_SIZE=1024
|
||||
CONFIG_COMMAND_STACK_SIZE=64
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=2048
|
||||
CONFIG_MAIN_STACK_SIZE=1024
|
||||
CONFIG_COMMAND_STACK_SIZE=64
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=128
|
||||
CONFIG_MAIN_STACK_SIZE=256
|
||||
CONFIG_COMMAND_STACK_SIZE=2
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=128
|
||||
CONFIG_MAIN_STACK_SIZE=256
|
||||
CONFIG_COMMAND_STACK_SIZE=2
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=128
|
||||
CONFIG_MAIN_STACK_SIZE=256
|
||||
CONFIG_COMMAND_STACK_SIZE=2
|
||||
|
|
1
tests/benchmarks/footprint/prj.conf
Normal file
1
tests/benchmarks/footprint/prj.conf
Normal file
|
@ -0,0 +1 @@
|
|||
CONFIG_TEST
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=512
|
||||
CONFIG_MAIN_STACK_SIZE=512
|
||||
CONFIG_COMMAND_STACK_SIZE=8
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=512
|
||||
CONFIG_MAIN_STACK_SIZE=512
|
||||
CONFIG_COMMAND_STACK_SIZE=8
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
# needed for printf output sent to console
|
||||
CONFIG_STDOUT_CONSOLE=y
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
# needed for printf output sent to console
|
||||
CONFIG_STDOUT_CONSOLE=y
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=128
|
||||
CONFIG_MAIN_STACK_SIZE=128
|
||||
CONFIG_SYS_CLOCK_TICKS_PER_SEC=0
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=128
|
||||
CONFIG_MAIN_STACK_SIZE=128
|
||||
CONFIG_SYS_CLOCK_TICKS_PER_SEC=0
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=128
|
||||
CONFIG_MAIN_STACK_SIZE=128
|
||||
CONFIG_SYS_CLOCK_TICKS_PER_SEC=0
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=128
|
||||
CONFIG_MAIN_STACK_SIZE=128
|
||||
CONFIG_SYS_CLOCK_TICKS_PER_SEC=0
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=128
|
||||
CONFIG_MAIN_STACK_SIZE=128
|
||||
CONFIG_PRINTK=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=128
|
||||
CONFIG_MAIN_STACK_SIZE=128
|
||||
CONFIG_PRINTK=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=128
|
||||
CONFIG_MAIN_STACK_SIZE=128
|
||||
CONFIG_PRINTK=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=128
|
||||
CONFIG_MAIN_STACK_SIZE=128
|
||||
CONFIG_PRINTK=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=128
|
||||
CONFIG_MAIN_STACK_SIZE=128
|
||||
CONFIG_PRINTK=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=128
|
||||
CONFIG_MAIN_STACK_SIZE=128
|
||||
CONFIG_PRINTK=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=128
|
||||
CONFIG_MAIN_STACK_SIZE=128
|
||||
CONFIG_PRINTK=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ISR_STACK_SIZE=128
|
||||
CONFIG_MAIN_STACK_SIZE=128
|
||||
CONFIG_PRINTK=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
# all printf, fprintf to stdout go to console
|
||||
CONFIG_STDOUT_CONSOLE=y
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_EXECUTION_BENCHMARKING=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_HEAP_MEM_POOL_SIZE=256
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_INIT_STACKS=y
|
||||
CONFIG_MAIN_STACK_SIZE=512
|
||||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_INIT_STACKS=y
|
||||
CONFIG_MAIN_STACK_SIZE=512
|
||||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_INIT_STACKS=y
|
||||
CONFIG_MAIN_STACK_SIZE=512
|
||||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_INIT_STACKS=y
|
||||
CONFIG_MAIN_STACK_SIZE=512
|
||||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_INIT_STACKS=y
|
||||
CONFIG_MAIN_STACK_SIZE=512
|
||||
CONFIG_MICROBIT_DISPLAY=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
#CONFIG_INIT_STACKS=y
|
||||
CONFIG_MAIN_STACK_SIZE=512
|
||||
CONFIG_MICROBIT_DISPLAY=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_INIT_STACKS=y
|
||||
CONFIG_MAIN_STACK_SIZE=512
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_INIT_STACKS=y
|
||||
CONFIG_MAIN_STACK_SIZE=512
|
||||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_INIT_STACKS=y
|
||||
CONFIG_MAIN_STACK_SIZE=512
|
||||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
#CONFIG_INIT_STACKS=y
|
||||
CONFIG_MAIN_STACK_SIZE=512
|
||||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
#CONFIG_INIT_STACKS=y
|
||||
CONFIG_USERSPACE=n
|
||||
CONFIG_MAIN_STACK_SIZE=320
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_USERSPACE=n
|
||||
#CONFIG_INIT_STACKS=y
|
||||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_BT=y
|
||||
CONFIG_CONSOLE_HANDLER=y
|
||||
CONFIG_BT_DEBUG_LOG=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_BT=y
|
||||
CONFIG_CONSOLE_HANDLER=y
|
||||
CONFIG_BT_DEBUG_LOG=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_BREDR=y
|
||||
CONFIG_BT_RFCOMM=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_UART_PIPE=y
|
||||
CONFIG_CONSOLE_HANDLER=y
|
||||
CONFIG_BT=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_UART_PIPE=y
|
||||
CONFIG_UART_PIPE_ON_DEV_NAME="UART_1"
|
||||
CONFIG_CONSOLE_HANDLER=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_STDOUT_CONSOLE=y
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_AIO_COMPARATOR=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ADC=y
|
||||
CONFIG_COUNTER=y
|
||||
CONFIG_DMA=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_NETWORKING=y
|
||||
CONFIG_NET_L2_ETHERNET=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
|
|
1
tests/drivers/build_all/prj.conf
Normal file
1
tests/drivers/build_all/prj.conf
Normal file
|
@ -0,0 +1 @@
|
|||
CONFIG_TEST=y
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_SENSOR=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_SENSOR=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_ADC=y
|
||||
CONFIG_GPIO=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_DMA=y
|
||||
CONFIG_SYS_LOG=y
|
||||
CONFIG_SYS_LOG_DMA_LEVEL=1
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_IPM_CONSOLE_RECEIVER=y
|
||||
CONFIG_IPM_CONSOLE_SENDER=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_BOOT_BANNER=y
|
||||
CONFIG_BUILD_TIMESTAMP=y
|
||||
CONFIG_SYS_LOG=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_BOOT_BANNER=y
|
||||
CONFIG_BUILD_TIMESTAMP=y
|
||||
CONFIG_SYS_LOG=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_SYS_LOG=y
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_SPI_LEGACY_API=n
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_SYS_LOG=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_LEGACY_API=n
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_SYS_LOG=y
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_SPI_LEGACY_API=n
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_FLOAT=y
|
||||
CONFIG_SSE=y
|
||||
CONFIG_FP_SHARING=y
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
CONFIG_TEST=y
|
||||
# Nothing needed
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_STACK_CANARIES=y
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_PTHREAD_IPC=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_STDOUT_CONSOLE=y
|
||||
CONFIG_NUM_IRQS=2
|
||||
CONFIG_FLOAT=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_DEBUG=y
|
||||
CONFIG_STDOUT_CONSOLE=y
|
||||
CONFIG_KERNEL_DEBUG=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_DEBUG=y
|
||||
CONFIG_STDOUT_CONSOLE=y
|
||||
CONFIG_NEWLIB_LIBC=y
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_RUNTIME_NMI=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ARC_INIT=n
|
||||
|
||||
CONFIG_NETWORKING=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_NETWORKING=y
|
||||
CONFIG_NET_TEST=y
|
||||
CONFIG_NET_L2_DUMMY=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_NETWORKING=y
|
||||
CONFIG_NET_TEST=y
|
||||
CONFIG_NET_IPV6=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_NET_TEST=y
|
||||
CONFIG_NETWORKING=y
|
||||
CONFIG_NET_IPV6=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_NETWORKING=y
|
||||
CONFIG_NET_TEST=y
|
||||
CONFIG_NET_L2_DUMMY=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_SYS_POWER_MANAGEMENT=y
|
||||
CONFIG_SYS_POWER_DEEP_SLEEP=y
|
||||
CONFIG_SYS_POWER_LOW_POWER_STATE=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_SYS_POWER_MANAGEMENT=y
|
||||
CONFIG_SYS_POWER_DEEP_SLEEP=y
|
||||
CONFIG_SYS_POWER_LOW_POWER_STATE=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ARC_INIT=n
|
||||
CONFIG_SYS_POWER_MANAGEMENT=y
|
||||
CONFIG_SYS_POWER_DEEP_SLEEP=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ARC_INIT=n
|
||||
CONFIG_SYS_POWER_MANAGEMENT=y
|
||||
CONFIG_SYS_POWER_DEEP_SLEEP=n
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_ASSERT=y
|
||||
CONFIG_ASSERT_LEVEL=2
|
||||
CONFIG_NUM_COOP_PRIORITIES=29
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
config ZTEST
|
||||
bool "Zephyr testing framework"
|
||||
default n
|
||||
select TEST
|
||||
help
|
||||
Enable the Zephyr testing framework. You should enable this only
|
||||
if you're writing automated tests.
|
||||
|
|
Loading…
Reference in a new issue