summaryrefslogtreecommitdiffstats
path: root/tools/perf/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests')
-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)
$(run):
$(call clean)
- @cmd="cd $(PERF) && make -f $(MK) $($@)"; \
+ @TMP_DEST=$$(mktemp -d); \
+ cmd="cd $(PERF) && make -f $(MK) DESTDIR=$$TMP_DEST $($@)"; \
echo "- $@: $$cmd" && echo $$cmd > $@ && \
( eval $$cmd ) >> $@ 2>&1; \
echo " test: $(call test,$@)"; \
$(call test,$@) && \
- rm -f $@
+ rm -f $@ \
+ rm -rf $$TMP_DEST
$(run_O):
$(call clean)
@TMP_O=$$(mktemp -d); \
- cmd="cd $(PERF) && make -f $(MK) $($(patsubst %_O,%,$@)) O=$$TMP_O"; \
+ TMP_DEST=$$(mktemp -d); \
+ cmd="cd $(PERF) && make -f $(MK) O=$$TMP_O DESTDIR=$$TMP_DEST $($(patsubst %_O,%,$@))"; \
echo "- $@: $$cmd" && echo $$cmd > $@ && \
( eval $$cmd ) >> $@ 2>&1 && \
echo " test: $(call test_O,$@)"; \
$(call test_O,$@) && \
rm -f $@ && \
- rm -rf $$TMP_O
+ rm -rf $$TMP_O \
+ rm -rf $$TMP_DEST
all: $(run) $(run_O)
@echo OK
OpenPOWER on IntegriCloud