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

perf tests: Add testing for Makefile.perf

Currently we test only builds through top level Makefile, but seems like
there's a bunch of users using Makefile.perf directly.

Changing the make suite to be run for Makefile.perf as well. It takes
now considerable amount of time, but hopefully we catch more issues.

Also fixing the output indentation for make_kernelsrc and
make_kernelsrc_tools tests.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Lukas Wunner <lukas@wunner.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1434977452-32520-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Jiri Olsa and committed by
Arnaldo Carvalho de Melo
502819c5 13d1e536

+20 -3
+20 -3
tools/perf/tests/make
··· 1 + ifndef MK 2 + ifeq ($(MAKECMDGOALS),) 3 + # no target specified, trigger the whole suite 4 + all: 5 + @echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile 6 + @echo "Testing Makefile.perf"; $(MAKE) -sf tests/make MK=Makefile.perf 7 + else 8 + # run only specific test over 'Makefile' 9 + %: 10 + @echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile $@ 11 + endif 12 + else 1 13 PERF := . 2 - MK := Makefile 3 14 4 15 include config/Makefile.arch 5 16 ··· 68 57 69 58 # $(run) contains all available tests 70 59 run := make_pure 60 + # Targets 'clean all' can be run together only through top level 61 + # Makefile because we detect clean target in Makefile.perf and 62 + # disable features detection 63 + ifeq ($(MK),Makefile) 71 64 run += make_clean_all 65 + endif 72 66 run += make_python_perf_so 73 67 run += make_debug 74 68 run += make_no_libperl ··· 242 226 ( eval $$cmd ) >> $@ 2>&1 243 227 244 228 make_kernelsrc: 245 - @echo " - make -C <kernelsrc> tools/perf" 229 + @echo "- make -C <kernelsrc> tools/perf" 246 230 $(call clean); \ 247 231 (make -C ../.. tools/perf) > $@ 2>&1 && \ 248 232 test -x perf && rm -f $@ || (cat $@ ; false) 249 233 250 234 make_kernelsrc_tools: 251 - @echo " - make -C <kernelsrc>/tools perf" 235 + @echo "- make -C <kernelsrc>/tools perf" 252 236 $(call clean); \ 253 237 (make -C ../../tools perf) > $@ 2>&1 && \ 254 238 test -x perf && rm -f $@ || (cat $@ ; false) ··· 260 244 @echo OK 261 245 262 246 .PHONY: all $(run) $(run_O) tarpkg clean 247 + endif # ifndef MK