Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/powerpc: Don't ignore errors from sub Makefiles

Currently we ignore errors from our sub Makefiles. We inherited that
from the top-level selftests Makefile which aims to build and run as
many tests as possible and damn the torpedoes.

For the powerpc tests we'd instead like any errors to fail the build, so
we can automatically catch build failures.

We can achieve the best of both worlds by using -k, which tells make to
keep building when it hits an error, but still reports the error.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Michael Ellerman and committed by
Benjamin Herrenschmidt
cbfd7dab 633440f1

+11 -14
+5 -5
tools/testing/selftests/powerpc/Makefile
··· 17 17 18 18 endif 19 19 20 - all: 21 - @for TARGET in $(TARGETS); do \ 22 - $(MAKE) -C $$TARGET all; \ 23 - done; 20 + all: $(TARGETS) 21 + 22 + $(TARGETS): 23 + $(MAKE) -k -C $@ all 24 24 25 25 run_tests: all 26 26 @for TARGET in $(TARGETS); do \ ··· 36 36 tags: 37 37 find . -name '*.c' -o -name '*.h' | xargs ctags 38 38 39 - .PHONY: all run_tests clean tags 39 + .PHONY: all run_tests clean tags $(TARGETS)
+6 -9
tools/testing/selftests/powerpc/pmu/Makefile
··· 4 4 PROGS := count_instructions 5 5 EXTRA_SOURCES := ../harness.c event.c 6 6 7 - all: $(PROGS) sub_all 7 + SUB_TARGETS = ebb 8 + 9 + all: $(PROGS) $(SUB_TARGETS) 8 10 9 11 $(PROGS): $(EXTRA_SOURCES) 10 12 ··· 22 20 clean: sub_clean 23 21 rm -f $(PROGS) loop.o 24 22 25 - 26 - SUB_TARGETS = ebb 27 - 28 - sub_all: 29 - @for TARGET in $(SUB_TARGETS); do \ 30 - $(MAKE) -C $$TARGET all; \ 31 - done; 23 + $(SUB_TARGETS): 24 + $(MAKE) -k -C $@ all 32 25 33 26 sub_run_tests: all 34 27 @for TARGET in $(SUB_TARGETS); do \ ··· 35 38 $(MAKE) -C $$TARGET clean; \ 36 39 done; 37 40 38 - .PHONY: all run_tests clean sub_all sub_run_tests sub_clean 41 + .PHONY: all run_tests clean sub_run_tests sub_clean $(SUB_TARGETS)