From adb25fb07574dd94c79e7a829f09424d67fe7fc3 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Thu, 12 Jul 2018 23:09:39 +0200 Subject: [PATCH] make: add global test target --- Makefile.include | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile.include b/Makefile.include index 06ca9e5b6e..54c253a81c 100644 --- a/Makefile.include +++ b/Makefile.include @@ -536,6 +536,13 @@ reset: $(call check_cmd,$(RESET),Reset program) $(RESET) $(RESET_FLAGS) +TESTS ?= $(foreach file,$(wildcard $(APPDIR)/tests/*),\ + $(shell test -f $(file) -a -x $(file) && echo $(file))) +test: $(TEST_DEPS) + $(Q) for t in $(TESTS); do \ + $$t || exit 1; \ + done + # Default OBJDUMPFLAGS for platforms which do not specify it: OBJDUMPFLAGS ?= -S -D -h