Skip to content

Commit 502819c

Browse files
olsajiriacmel
authored andcommitted
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>
1 parent 13d1e53 commit 502819c

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

  • tools/perf/tests

‎tools/perf/tests/make‎

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
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
113
PERF := .
2-
MK := Makefile
314

415
include config/Makefile.arch
516

@@ -57,7 +68,12 @@ make_minimal += NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1
5768

5869
# $(run) contains all available tests
5970
run := 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
74+
ifeq ($(MK),Makefile)
6075
run += make_clean_all
76+
endif
6177
run += make_python_perf_so
6278
run += make_debug
6379
run += make_no_libperl
@@ -226,13 +242,13 @@ tarpkg:
226242
( eval $$cmd ) >> $@ 2>&1
227243

228244
make_kernelsrc:
229-
@echo " - make -C <kernelsrc> tools/perf"
245+
@echo "- make -C <kernelsrc> tools/perf"
230246
$(call clean); \
231247
(make -C ../.. tools/perf) > $@ 2>&1 && \
232248
test -x perf && rm -f $@ || (cat $@ ; false)
233249

234250
make_kernelsrc_tools:
235-
@echo " - make -C <kernelsrc>/tools perf"
251+
@echo "- make -C <kernelsrc>/tools perf"
236252
$(call clean); \
237253
(make -C ../../tools perf) > $@ 2>&1 && \
238254
test -x perf && rm -f $@ || (cat $@ ; false)
@@ -244,3 +260,4 @@ out: $(run_O)
244260
@echo OK
245261

246262
.PHONY: all $(run) $(run_O) tarpkg clean
263+
endif # ifndef MK

0 commit comments

Comments
 (0)