summaryrefslogtreecommitdiffstats
path: root/tools/perf/Build
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tools/perf/Build14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/perf/Build b/tools/perf/Build
index aa76236228..b0cb7ad8e6 100644
--- a/tools/perf/Build
+++ b/tools/perf/Build
@@ -59,3 +59,17 @@ perf-y += ui/
perf-y += scripts/
gtk-y += ui/gtk/
+
+ifdef SHELLCHECK
+ SHELL_TESTS := $(wildcard *.sh)
+ TEST_LOGS := $(SHELL_TESTS:%=%.shellcheck_log)
+else
+ SHELL_TESTS :=
+ TEST_LOGS :=
+endif
+
+$(OUTPUT)%.shellcheck_log: %
+ $(call rule_mkdir)
+ $(Q)$(call echo-cmd,test)shellcheck -s bash -a -S warning "$<" > $@ || (cat $@ && rm $@ && false)
+
+perf-y += $(TEST_LOGS)