aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2015-06-22 08:50:50 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-06-22 10:21:57 -0400
commit502819c5f35ef44eb7151fb85cd883c5b76b506d (patch)
treedff0fbc19d1935863d2510c3f9cefac672beaa31 /tools
parent13d1e536b14ec2d404319a25e681a3287ca084ad (diff)
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/tests/make23
1 files changed, 20 insertions, 3 deletions
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index 65280d28662e..bfe1962da0df 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -1,5 +1,16 @@
1ifndef MK
2ifeq ($(MAKECMDGOALS),)
3# no target specified, trigger the whole suite
4all:
5 @echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile
6 @echo "Testing Makefile.perf"; $(MAKE) -sf tests/make MK=Makefile.perf
7else
8# run only specific test over 'Makefile'
9%:
10 @echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile $@
11endif
12else
1PERF := . 13PERF := .
2MK := Makefile
3 14
4include config/Makefile.arch 15include config/Makefile.arch
5 16
@@ -57,7 +68,12 @@ make_minimal += NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1
57 68
58# $(run) contains all available tests 69# $(run) contains all available tests
59run := make_pure 70run := make_pure
71# Targets 'clean all' can be run together only through top level
72# Makefile because we detect clean target in Makefile.perf and
73# disable features detection
74ifeq ($(MK),Makefile)
60run += make_clean_all 75run += make_clean_all
76endif
61run += make_python_perf_so 77run += make_python_perf_so
62run += make_debug 78run += make_debug
63run += make_no_libperl 79run += make_no_libperl
@@ -226,13 +242,13 @@ tarpkg:
226 ( eval $$cmd ) >> $@ 2>&1 242 ( eval $$cmd ) >> $@ 2>&1
227 243
228make_kernelsrc: 244make_kernelsrc:
229 @echo " - make -C <kernelsrc> tools/perf" 245 @echo "- make -C <kernelsrc> tools/perf"
230 $(call clean); \ 246 $(call clean); \
231 (make -C ../.. tools/perf) > $@ 2>&1 && \ 247 (make -C ../.. tools/perf) > $@ 2>&1 && \
232 test -x perf && rm -f $@ || (cat $@ ; false) 248 test -x perf && rm -f $@ || (cat $@ ; false)
233 249
234make_kernelsrc_tools: 250make_kernelsrc_tools:
235 @echo " - make -C <kernelsrc>/tools perf" 251 @echo "- make -C <kernelsrc>/tools perf"
236 $(call clean); \ 252 $(call clean); \
237 (make -C ../../tools perf) > $@ 2>&1 && \ 253 (make -C ../../tools perf) > $@ 2>&1 && \
238 test -x perf && rm -f $@ || (cat $@ ; false) 254 test -x perf && rm -f $@ || (cat $@ ; false)
@@ -244,3 +260,4 @@ out: $(run_O)
244 @echo OK 260 @echo OK
245 261
246.PHONY: all $(run) $(run_O) tarpkg clean 262.PHONY: all $(run) $(run_O) tarpkg clean
263endif # ifndef MK