Skip to content

Commit

Permalink
perf tests: Add testing for Makefile.perf
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed Jun 22, 2015
1 parent 13d1e53 commit 502819c
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions tools/perf/tests/make
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
ifndef MK
ifeq ($(MAKECMDGOALS),)
# no target specified, trigger the whole suite
all:
@echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile
@echo "Testing Makefile.perf"; $(MAKE) -sf tests/make MK=Makefile.perf
else
# run only specific test over 'Makefile'
%:
@echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile $@
endif
else
PERF := .
MK := Makefile

include config/Makefile.arch

Expand Down Expand Up @@ -57,7 +68,12 @@ make_minimal += NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1

# $(run) contains all available tests
run := make_pure
# Targets 'clean all' can be run together only through top level
# Makefile because we detect clean target in Makefile.perf and
# disable features detection
ifeq ($(MK),Makefile)
run += make_clean_all
endif
run += make_python_perf_so
run += make_debug
run += make_no_libperl
Expand Down Expand Up @@ -226,13 +242,13 @@ tarpkg:
( eval $$cmd ) >> $@ 2>&1

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

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

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

0 comments on commit 502819c

Please sign in to comment.