aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/make
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2013-07-22 08:43:32 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-07-22 15:52:50 -0400
commitc9311674e73345d4d02595c80d43f4bcf9ff3a3f (patch)
tree5557ce5930e38e0c20891d8629b9ce0e4fdc51bf /tools/perf/tests/make
parent8ba7cdea321d4d5bb53ac210f4e0a4bca5b0dba5 (diff)
perf tests: Add DESTDIR=TMP_DEST tests/make variable
Adding TMP_DEST tests/make variable to provide the DESTDIR directory for installation tests. Adding this to existing test targets, since DESTDIR variable 'should not' affect other than install* targets. We can always separate this if there's a need for DESTDIR-free build test. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1374497014-2817-4-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/make')
-rw-r--r--tools/perf/tests/make12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index dbbb62c0d0f3..7646a0076356 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -118,23 +118,27 @@ clean := @(cd $(PERF); make -s -f $(MK) clean >/dev/null)
118 118
119$(run): 119$(run):
120 $(call clean) 120 $(call clean)
121 @cmd="cd $(PERF) && make -f $(MK) $($@)"; \ 121 @TMP_DEST=$$(mktemp -d); \
122 cmd="cd $(PERF) && make -f $(MK) DESTDIR=$$TMP_DEST $($@)"; \
122 echo "- $@: $$cmd" && echo $$cmd > $@ && \ 123 echo "- $@: $$cmd" && echo $$cmd > $@ && \
123 ( eval $$cmd ) >> $@ 2>&1; \ 124 ( eval $$cmd ) >> $@ 2>&1; \
124 echo " test: $(call test,$@)"; \ 125 echo " test: $(call test,$@)"; \
125 $(call test,$@) && \ 126 $(call test,$@) && \
126 rm -f $@ 127 rm -f $@ \
128 rm -rf $$TMP_DEST
127 129
128$(run_O): 130$(run_O):
129 $(call clean) 131 $(call clean)
130 @TMP_O=$$(mktemp -d); \ 132 @TMP_O=$$(mktemp -d); \
131 cmd="cd $(PERF) && make -f $(MK) $($(patsubst %_O,%,$@)) O=$$TMP_O"; \ 133 TMP_DEST=$$(mktemp -d); \
134 cmd="cd $(PERF) && make -f $(MK) O=$$TMP_O DESTDIR=$$TMP_DEST $($(patsubst %_O,%,$@))"; \
132 echo "- $@: $$cmd" && echo $$cmd > $@ && \ 135 echo "- $@: $$cmd" && echo $$cmd > $@ && \
133 ( eval $$cmd ) >> $@ 2>&1 && \ 136 ( eval $$cmd ) >> $@ 2>&1 && \
134 echo " test: $(call test_O,$@)"; \ 137 echo " test: $(call test_O,$@)"; \
135 $(call test_O,$@) && \ 138 $(call test_O,$@) && \
136 rm -f $@ && \ 139 rm -f $@ && \
137 rm -rf $$TMP_O 140 rm -rf $$TMP_O \
141 rm -rf $$TMP_DEST
138 142
139all: $(run) $(run_O) 143all: $(run) $(run_O)
140 @echo OK 144 @echo OK