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:
Anas Nashif 2018-01-06 16:15:53 -05:00 committed by Anas Nashif
parent 33592e8aa8
commit 829598be2b
82 changed files with 92 additions and 0 deletions

View file

@ -1 +1,5 @@
add_subdirectory_if_kconfig(ztest)
zephyr_include_directories_ifdef(CONFIG_TEST
$ENV{ZEPHYR_BASE}/tests/include
)

View file

@ -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

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
# all printf, fprintf to stdout go to console
CONFIG_STDOUT_CONSOLE=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
# all printf, fprintf to stdout go to console
CONFIG_STDOUT_CONSOLE=y
CONFIG_MAIN_THREAD_PRIORITY=6

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_PERFORMANCE_METRICS=y
CONFIG_BOOT_TIME_MEASUREMENT=y
CONFIG_TEST_RANDOM_GENERATOR=y

View file

@ -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()

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=2048
CONFIG_MAIN_STACK_SIZE=1024
CONFIG_COMMAND_STACK_SIZE=64

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=2048
CONFIG_MAIN_STACK_SIZE=1024
CONFIG_COMMAND_STACK_SIZE=64

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=2048
CONFIG_MAIN_STACK_SIZE=1024
CONFIG_COMMAND_STACK_SIZE=64

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=2048
CONFIG_MAIN_STACK_SIZE=1024
CONFIG_COMMAND_STACK_SIZE=64

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=128
CONFIG_MAIN_STACK_SIZE=256
CONFIG_COMMAND_STACK_SIZE=2

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=128
CONFIG_MAIN_STACK_SIZE=256
CONFIG_COMMAND_STACK_SIZE=2

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=128
CONFIG_MAIN_STACK_SIZE=256
CONFIG_COMMAND_STACK_SIZE=2

View file

@ -0,0 +1 @@
CONFIG_TEST

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=512
CONFIG_MAIN_STACK_SIZE=512
CONFIG_COMMAND_STACK_SIZE=8

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=512
CONFIG_MAIN_STACK_SIZE=512
CONFIG_COMMAND_STACK_SIZE=8

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
# needed for printf output sent to console
CONFIG_STDOUT_CONSOLE=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
# needed for printf output sent to console
CONFIG_STDOUT_CONSOLE=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=128
CONFIG_MAIN_STACK_SIZE=128
CONFIG_SYS_CLOCK_TICKS_PER_SEC=0

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=128
CONFIG_MAIN_STACK_SIZE=128
CONFIG_SYS_CLOCK_TICKS_PER_SEC=0

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=128
CONFIG_MAIN_STACK_SIZE=128
CONFIG_SYS_CLOCK_TICKS_PER_SEC=0

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=128
CONFIG_MAIN_STACK_SIZE=128
CONFIG_SYS_CLOCK_TICKS_PER_SEC=0

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=128
CONFIG_MAIN_STACK_SIZE=128
CONFIG_PRINTK=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=128
CONFIG_MAIN_STACK_SIZE=128
CONFIG_PRINTK=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=128
CONFIG_MAIN_STACK_SIZE=128
CONFIG_PRINTK=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=128
CONFIG_MAIN_STACK_SIZE=128
CONFIG_PRINTK=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=128
CONFIG_MAIN_STACK_SIZE=128
CONFIG_PRINTK=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=128
CONFIG_MAIN_STACK_SIZE=128
CONFIG_PRINTK=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=128
CONFIG_MAIN_STACK_SIZE=128
CONFIG_PRINTK=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ISR_STACK_SIZE=128
CONFIG_MAIN_STACK_SIZE=128
CONFIG_PRINTK=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
# all printf, fprintf to stdout go to console
CONFIG_STDOUT_CONSOLE=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_EXECUTION_BENCHMARKING=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_HEAP_MEM_POOL_SIZE=256

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_INIT_STACKS=y
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_INIT_STACKS=y
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_INIT_STACKS=y
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_INIT_STACKS=y
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_INIT_STACKS=y
CONFIG_MAIN_STACK_SIZE=512
CONFIG_MICROBIT_DISPLAY=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
#CONFIG_INIT_STACKS=y
CONFIG_MAIN_STACK_SIZE=512
CONFIG_MICROBIT_DISPLAY=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_INIT_STACKS=y
CONFIG_MAIN_STACK_SIZE=512

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_INIT_STACKS=y
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_INIT_STACKS=y
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
#CONFIG_INIT_STACKS=y
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
#CONFIG_INIT_STACKS=y
CONFIG_USERSPACE=n
CONFIG_MAIN_STACK_SIZE=320

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_USERSPACE=n
#CONFIG_INIT_STACKS=y
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_BT=y
CONFIG_CONSOLE_HANDLER=y
CONFIG_BT_DEBUG_LOG=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_BT=y
CONFIG_CONSOLE_HANDLER=y
CONFIG_BT_DEBUG_LOG=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_BT=y
CONFIG_BT_BREDR=y
CONFIG_BT_RFCOMM=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_UART_PIPE=y
CONFIG_CONSOLE_HANDLER=y
CONFIG_BT=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_UART_PIPE=y
CONFIG_UART_PIPE_ON_DEV_NAME="UART_1"
CONFIG_CONSOLE_HANDLER=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_PRINTK=y
CONFIG_AIO_COMPARATOR=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ADC=y
CONFIG_COUNTER=y
CONFIG_DMA=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_NETWORKING=y
CONFIG_NET_L2_ETHERNET=y
CONFIG_ENTROPY_GENERATOR=y

View file

@ -0,0 +1 @@
CONFIG_TEST=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_GPIO=y
CONFIG_I2C=y
CONFIG_SENSOR=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_GPIO=y
CONFIG_I2C=y
CONFIG_SENSOR=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_I2C=y
CONFIG_ADC=y
CONFIG_GPIO=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_DMA=y
CONFIG_SYS_LOG=y
CONFIG_SYS_LOG_DMA_LEVEL=1

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_CONSOLE=y
CONFIG_IPM_CONSOLE_RECEIVER=y
CONFIG_IPM_CONSOLE_SENDER=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_BOOT_BANNER=y
CONFIG_BUILD_TIMESTAMP=y
CONFIG_SYS_LOG=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_BOOT_BANNER=y
CONFIG_BUILD_TIMESTAMP=y
CONFIG_SYS_LOG=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_SYS_LOG=y
CONFIG_GPIO=y
CONFIG_SPI_LEGACY_API=n

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_SYS_LOG=y
CONFIG_SPI=y
CONFIG_SPI_LEGACY_API=n

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_SYS_LOG=y
CONFIG_GPIO=y
CONFIG_SPI_LEGACY_API=n

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_FLOAT=y
CONFIG_SSE=y
CONFIG_FP_SHARING=y

View file

@ -1 +1,2 @@
CONFIG_TEST=y
# Nothing needed

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_STACK_CANARIES=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y

View file

@ -1 +1,2 @@
CONFIG_TEST=y
CONFIG_PTHREAD_IPC=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_NUM_IRQS=2
CONFIG_FLOAT=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_DEBUG=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_KERNEL_DEBUG=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_DEBUG=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_NEWLIB_LIBC=y

View file

@ -1 +1,2 @@
CONFIG_TEST=y
CONFIG_RUNTIME_NMI=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ARC_INIT=n
CONFIG_NETWORKING=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_NETWORKING=y
CONFIG_NET_TEST=y
CONFIG_NET_L2_DUMMY=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_NETWORKING=y
CONFIG_NET_TEST=y
CONFIG_NET_IPV6=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_NET_TEST=y
CONFIG_NETWORKING=y
CONFIG_NET_IPV6=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_NETWORKING=y
CONFIG_NET_TEST=y
CONFIG_NET_L2_DUMMY=y

View file

@ -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

View file

@ -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

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ARC_INIT=n
CONFIG_SYS_POWER_MANAGEMENT=y
CONFIG_SYS_POWER_DEEP_SLEEP=y

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ARC_INIT=n
CONFIG_SYS_POWER_MANAGEMENT=y
CONFIG_SYS_POWER_DEEP_SLEEP=n

View file

@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_ASSERT=y
CONFIG_ASSERT_LEVEL=2
CONFIG_NUM_COOP_PRIORITIES=29

View file

@ -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.