summaryrefslogtreecommitdiff
path: root/tools/perf/Build
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2026-09-30 22:41:18 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-10-01 17:53:34 +0200
commit857dad68dcb3a4f91eb356891d2da82322a740c2 (patch)
tree18103f9247f8e08e79bb7e371bdf1dd762ac5669 /tools/perf/Build
parentcd116fcbc0bec7340a659e62210b963c49f93c1e (diff)
perf build: Run shellcheck, mypy, and remaining pylint checks in parallel
Following the approach used for pylint on standalone scripts and tests, move the shellcheck and mypy checks in tools/perf/Build and tools/perf/tests/Build, as well as the mypy and pylint checks in tools/perf/util/Build and tools/perf/pmu-events/Build, into dedicated phony targets invoked as top-level sub-makes from Makefile.perf. Also add 'perf' to pylint's --ignored-modules (leaving perf module type-checking to mypy via perf.pyi), since astroid's ImportlibFinder only resolves .pyi stubs for package directories (__init__.pyi) rather than single-file stubs like perf.pyi and does not introspect C extensions by default. This removes the need for pylint to wait on building $(LANG_BINDINGS). This avoids blocking jevents code generation, archive creation (libperf-util.a, libperf-test.a, libpmu-events.a), and final linking of the perf binary and Python extension on linter execution. Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Build')
-rw-r--r--tools/perf/Build8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/perf/Build b/tools/perf/Build
index 09fd88f5aca5..dcba5ba55206 100644
--- a/tools/perf/Build
+++ b/tools/perf/Build
@@ -76,7 +76,9 @@ $(OUTPUT)%.shellcheck_log: %
$(call rule_mkdir)
$(Q)$(call echo-cmd,test)$(SHELLCHECK) "$<" > $@ || (cat $@ && rm $@ && false)
-perf-y += $(SHELL_TEST_LOGS)
+.PHONY: shellcheck
+shellcheck: $(addprefix $(OUTPUT),$(SHELL_TEST_LOGS))
+ @:
ifdef MYPY
PY_TESTS := $(shell find python -type f -name '*.py')
@@ -89,7 +91,9 @@ $(OUTPUT)%.mypy_log: %
$(call rule_mkdir)
$(Q)$(call echo-cmd,test)$(MYPY) "$<" > $@ || (cat $@ && rm $@ && false)
-perf-y += $(MYPY_TEST_LOGS)
+.PHONY: mypy
+mypy: $(addprefix $(OUTPUT),$(MYPY_TEST_LOGS))
+ @:
ifdef PYLINT
PY_TESTS := $(shell find python -type f -name '*.py')