aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2013-12-19 08:41:59 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-12-19 14:18:08 -0500
commitee4ad93e82b8fd260ae618f6b0413cd321bc09cb (patch)
treed1de3ac651a44a2a8a366717ccf4038690a80b6d /tools/perf/tests
parentb40067964f09a5b4d9e133dec225007ee0a13050 (diff)
perf tests: Factor make install tests
Factoring make install tests to check for multiple files. Adding default set of installed files for install and install_bin tests. Putting the 'test' line into the log file instead to the screen as it gets more complex now. If the tests fails to find a file, following message is displayed: $ make -f tests/make make_install_bin - make_install_bin: cd . && make -f Makefile DESTDIR=/tmp/tmp.nCVuQoSHaJ install-bin failed to find: bin/perf Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1387460527-15030-2-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests')
-rw-r--r--tools/perf/tests/make38
1 files changed, 32 insertions, 6 deletions
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index 2ca0abf1b2b6..f641c35f2321 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -106,10 +106,36 @@ test_make_python_perf_so := test -f $(PERF)/python/perf.so
106test_make_perf_o := test -f $(PERF)/perf.o 106test_make_perf_o := test -f $(PERF)/perf.o
107test_make_util_map_o := test -f $(PERF)/util/map.o 107test_make_util_map_o := test -f $(PERF)/util/map.o
108 108
109test_make_install := test -x $$TMP_DEST/bin/perf 109define test_dest_files
110test_make_install_O := $(test_make_install) 110 for file in $(1); do \
111test_make_install_bin := $(test_make_install) 111 if [ ! -x $$TMP_DEST/$$file ]; then \
112test_make_install_bin_O := $(test_make_install) 112 echo " failed to find: $$file"; \
113 fi \
114 done
115endef
116
117installed_files_bin := bin/perf
118installed_files_bin += etc/bash_completion.d/perf
119installed_files_bin += libexec/perf-core/perf-archive
120
121installed_files_plugins := lib64/traceevent/plugins/plugin_cfg80211.so
122installed_files_plugins += lib64/traceevent/plugins/plugin_scsi.so
123installed_files_plugins += lib64/traceevent/plugins/plugin_xen.so
124installed_files_plugins += lib64/traceevent/plugins/plugin_function.so
125installed_files_plugins += lib64/traceevent/plugins/plugin_sched_switch.so
126installed_files_plugins += lib64/traceevent/plugins/plugin_mac80211.so
127installed_files_plugins += lib64/traceevent/plugins/plugin_kvm.so
128installed_files_plugins += lib64/traceevent/plugins/plugin_kmem.so
129installed_files_plugins += lib64/traceevent/plugins/plugin_hrtimer.so
130installed_files_plugins += lib64/traceevent/plugins/plugin_jbd2.so
131
132installed_files_all := $(installed_files_bin)
133installed_files_all += $(installed_files_plugins)
134
135test_make_install := $(call test_dest_files,$(installed_files_all))
136test_make_install_O := $(call test_dest_files,$(installed_files_all))
137test_make_install_bin := $(call test_dest_files,$(installed_files_bin))
138test_make_install_bin_O := $(call test_dest_files,$(installed_files_bin))
113 139
114# FIXME nothing gets installed 140# FIXME nothing gets installed
115test_make_install_man := test -f $$TMP_DEST/share/man/man1/perf.1 141test_make_install_man := test -f $$TMP_DEST/share/man/man1/perf.1
@@ -162,7 +188,7 @@ $(run):
162 cmd="cd $(PERF) && make -f $(MK) DESTDIR=$$TMP_DEST $($@)"; \ 188 cmd="cd $(PERF) && make -f $(MK) DESTDIR=$$TMP_DEST $($@)"; \
163 echo "- $@: $$cmd" && echo $$cmd > $@ && \ 189 echo "- $@: $$cmd" && echo $$cmd > $@ && \
164 ( eval $$cmd ) >> $@ 2>&1; \ 190 ( eval $$cmd ) >> $@ 2>&1; \
165 echo " test: $(call test,$@)"; \ 191 echo " test: $(call test,$@)" >> $@ 2>&1; \
166 $(call test,$@) && \ 192 $(call test,$@) && \
167 rm -f $@ \ 193 rm -f $@ \
168 rm -rf $$TMP_DEST 194 rm -rf $$TMP_DEST
@@ -174,7 +200,7 @@ $(run_O):
174 cmd="cd $(PERF) && make -f $(MK) O=$$TMP_O DESTDIR=$$TMP_DEST $($(patsubst %_O,%,$@))"; \ 200 cmd="cd $(PERF) && make -f $(MK) O=$$TMP_O DESTDIR=$$TMP_DEST $($(patsubst %_O,%,$@))"; \
175 echo "- $@: $$cmd" && echo $$cmd > $@ && \ 201 echo "- $@: $$cmd" && echo $$cmd > $@ && \
176 ( eval $$cmd ) >> $@ 2>&1 && \ 202 ( eval $$cmd ) >> $@ 2>&1 && \
177 echo " test: $(call test_O,$@)"; \ 203 echo " test: $(call test_O,$@)" >> $@ 2>&1; \
178 $(call test_O,$@) && \ 204 $(call test_O,$@) && \
179 rm -f $@ && \ 205 rm -f $@ && \
180 rm -rf $$TMP_O \ 206 rm -rf $$TMP_O \