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

perf tools: Add a build-test variant to use in builds from a tarball

To use in automated tests inside containers from a tarball generated
by 'make perf-tar-src-pkg*', where testing building from a tarball
is obviously not needed, so add a 'build-test-tarball' for that case.

And don't build with gtk2 as this complicates things for cross builds
where we don't always have all the libraries a full perf build requires
available for the target arch, ditto for static builds.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+24 -3
+4 -1
tools/perf/Makefile
··· 100 100 # make -C tools/perf -f tests/make 101 101 # 102 102 build-test: 103 - @$(MAKE) SHUF=1 -f tests/make REUSE_FEATURES_DUMP=1 MK=Makefile SET_PARALLEL=1 --no-print-directory tarpkg out 103 + @$(MAKE) SHUF=1 -f tests/make REUSE_FEATURES_DUMP=1 MK=Makefile SET_PARALLEL=1 --no-print-directory tarpkg make_static make_with_gtk2 out 104 + 105 + build-test-tarball: 106 + @$(MAKE) -f tests/make REUSE_FEATURES_DUMP=1 MK=Makefile SET_PARALLEL=1 --no-print-directory out 104 107 105 108 # 106 109 # All other targets get passed through:
+20 -2
tools/perf/tests/make
··· 155 155 run += make_with_babeltrace 156 156 run += make_with_clangllvm 157 157 run += make_with_libpfm4 158 - run += make_with_gtk2 159 158 run += make_help 160 159 run += make_doc 161 160 run += make_perf_o ··· 171 172 # run += make_install_info 172 173 # run += make_install_pdf 173 174 run += make_minimal 174 - run += make_static 175 175 176 176 ifneq ($(call has,ctags),) 177 177 run += make_tags ··· 296 298 clean := @(cd $(PERF); $(MAKE_F) -s $(O_OPT) clean >/dev/null && $(MAKE) -s $(O_OPT) -C ../build clean >/dev/null) 297 299 298 300 $(run): 301 + $(call clean) 302 + @TMP_DEST=$$(mktemp -d); \ 303 + cmd="cd $(PERF) && $(MAKE_F) $($@) $(PARALLEL_OPT) $(O_OPT) DESTDIR=$$TMP_DEST"; \ 304 + printf "%*.*s: %s\n" $(max_width) $(max_width) "$@" "$$cmd" && echo $$cmd > $@ && \ 305 + ( eval $$cmd ) >> $@ 2>&1; \ 306 + echo " test: $(call test,$@)" >> $@ 2>&1; \ 307 + $(call test,$@) && \ 308 + rm -rf $@ $$TMP_DEST || (cat $@ ; false) 309 + 310 + make_with_gtk2: 311 + $(call clean) 312 + @TMP_DEST=$$(mktemp -d); \ 313 + cmd="cd $(PERF) && $(MAKE_F) $($@) $(PARALLEL_OPT) $(O_OPT) DESTDIR=$$TMP_DEST"; \ 314 + printf "%*.*s: %s\n" $(max_width) $(max_width) "$@" "$$cmd" && echo $$cmd > $@ && \ 315 + ( eval $$cmd ) >> $@ 2>&1; \ 316 + echo " test: $(call test,$@)" >> $@ 2>&1; \ 317 + $(call test,$@) && \ 318 + rm -rf $@ $$TMP_DEST || (cat $@ ; false) 319 + 320 + make_static: 299 321 $(call clean) 300 322 @TMP_DEST=$$(mktemp -d); \ 301 323 cmd="cd $(PERF) && $(MAKE_F) $($@) $(PARALLEL_OPT) $(O_OPT) DESTDIR=$$TMP_DEST"; \