diff --git a/Makefile.include b/Makefile.include index 74cd9dd089..59ccb38dc6 100644 --- a/Makefile.include +++ b/Makefile.include @@ -569,7 +569,7 @@ reset: $(call check_cmd,$(RESET),Reset program) $(RESET) $(RESET_FLAGS) -.PHONY: test +.PHONY: test test/available TESTS ?= $(foreach file,$(wildcard $(APPDIR)/tests/*),\ $(shell test -f $(file) -a -x $(file) && echo $(file))) test: $(TEST_DEPS) @@ -577,6 +577,10 @@ test: $(TEST_DEPS) $$t || exit 1; \ done +test/available: + $(Q)test -n "$(strip $(TESTS))" + + # Default OBJDUMPFLAGS for platforms which do not specify it: OBJDUMPFLAGS ?= -S -D -h diff --git a/tests/README.md b/tests/README.md index a760cd1769..e0e3b1f5f9 100644 --- a/tests/README.md +++ b/tests/README.md @@ -20,3 +20,10 @@ testing. From the test application directory run: BOARD= make flash test + + +An automated way of knowing if a test is available is to execute the +'test/available' target from the test application directory. +It executes without error if tests run by 'make test' are present. + + make test/available