diff options
Diffstat (limited to 'Test.mk')
-rw-r--r-- | Test.mk | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -21,15 +21,22 @@ # Daniel Lezcano <daniel.lezcano@linaro.org> (IBM Corporation) # - initial API and implementation # - -TST=$(wildcard *.sh) +SNT=$(wildcard *sanity.sh) +TST=$(wildcard *[^(sanity)].sh) LOG=$(TST:.sh=.log) CFLAGS?=-g -Wall -pthread CC?=gcc SRC=$(wildcard *.c) EXEC=$(SRC:%.c=%) -check: uncheck $(EXEC) $(LOG) +check: run_tests + +SANITY_STATUS:= $(shell if test $(SNT) && test -f $(SNT); then \ + ./$(SNT); if test "$$?" -eq 0; then echo 0; else \ + echo 1; fi; else echo 1; fi) + +ifeq "$(SANITY_STATUS)" "1" +run_tests: uncheck $(EXEC) $(LOG) %.log: %.sh @echo "###" @@ -38,6 +45,10 @@ check: uncheck $(EXEC) $(LOG) @echo -n "### "; grep "URL :" ./$< | awk '/http/{print $$NF}' @echo "###" @./$< 2> $@ +else +run_tests: $(SNT) + @cat $(<:.sh=.txt) +endif clean: rm -f *.o $(EXEC) |