Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion testing/drivers/drivertest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,23 @@
#
# ##############################################################################

if(CONFIG_TESTING_DRIVER_TEST)
if(CONFIG_TESTING_DRIVER_TEST_WATCHDOG_ONLY)
nuttx_add_application(
NAME
cmocka_driver_watchdog
PRIORITY
${CONFIG_TESTING_DRIVER_TEST_PRIORITY}
STACKSIZE
${CONFIG_TESTING_DRIVER_TEST_STACKSIZE}
MODULE
${CONFIG_TESTING_DRIVER_TEST}
DEPENDS
cmocka
SRCS
drivertest_watchdog.c)
endif()

if(CONFIG_TESTING_DRIVER_TEST AND NOT CONFIG_TESTING_DRIVER_TEST_WATCHDOG_ONLY)
if(CONFIG_TESTING_DRIVER_TEST_SIMPLE)
nuttx_add_application(
NAME
Expand Down
8 changes: 8 additions & 0 deletions testing/drivers/drivertest/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ config TESTING_DRIVER_TEST_SIMPLE
bool "Enable cmocka driver simple test"
default n

config TESTING_DRIVER_TEST_WATCHDOG_ONLY
bool "Build only the watchdog notifier cmocka test"
default n
depends on WATCHDOG
---help---
Build only cmocka_driver_watchdog. This is useful for a minimal
simulator validation configuration without unrelated driver tests.

config TESTING_ONESHOT_TEST
bool "Enable cmocka oneshot test"
default n
Expand Down
7 changes: 7 additions & 0 deletions testing/drivers/drivertest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ PRIORITY = $(CONFIG_TESTING_DRIVER_TEST_PRIORITY)
STACKSIZE = $(CONFIG_TESTING_DRIVER_TEST_STACKSIZE)
MODULE = $(CONFIG_TESTING_DRIVER_TEST)

ifeq ($(CONFIG_TESTING_DRIVER_TEST_WATCHDOG_ONLY),y)
MAINSRC += drivertest_watchdog.c
PROGNAME += cmocka_driver_watchdog
else

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why skip other wdog test


ifneq ($(CONFIG_TESTING_DRIVER_TEST_SIMPLE),)
MAINSRC += drivertest_simple.c
PROGNAME += cmocka_driver_simple
Expand Down Expand Up @@ -158,4 +163,6 @@ MAINSRC += drivertest_pm_runtime.c
PROGNAME += cmocka_driver_pm_runtime
endif

endif

include $(APPDIR)/Application.mk
Loading
Loading