@@ -320,9 +320,23 @@ v8: ## Build deps/v8.
320320 export PATH=" $( NO_BIN_OVERRIDE_PATH) " && \
321321 tools/make-v8.sh $(V8_ARCH ) .$(BUILDTYPE_LOWER ) $(V8_BUILD_OPTIONS )
322322
323+ ifeq ($(V8_USE_PERFETTO ) ,1)
324+ TRACE_PROCESSOR_SHELL_PATH ?= tools/perfetto/trace_processor_shell
325+
326+ # The downloaded copy has to match the vendored perfetto, so a version bump
327+ # re-downloads it. An overridden path is a build we do not manage and may not
328+ # be writable, so it gets no prerequisite and is left alone once it exists.
329+ ifeq ($(TRACE_PROCESSOR_SHELL_PATH ) ,tools/perfetto/trace_processor_shell)
330+ TRACE_PROCESSOR_SHELL_DEPS = deps/perfetto/VERSION
331+ endif
332+
333+ $(TRACE_PROCESSOR_SHELL_PATH ) : $(TRACE_PROCESSOR_SHELL_DEPS )
334+ @tools/perfetto/get_trace_processor $@
335+
336+ endif # </V8_USE_PERFETTO == 1>
337+
323338.PHONY : jstest
324- # # Run addon tests and JS tests.
325- jstest : build-addons build-js-native-api-tests build-node-api-tests build-sqlite-tests build-ffi-tests $(TRACE_PROCESSOR_SHELL_PATH )
339+ jstest : build-addons build-js-native-api-tests build-node-api-tests build-sqlite-tests build-ffi-tests $(TRACE_PROCESSOR_SHELL_PATH ) # # Run addon tests and JS tests.
326340 $(PYTHON ) tools/test.py $(PARALLEL_ARGS ) --mode=$(BUILDTYPE_LOWER ) \
327341 $(TEST_CI_ARGS ) \
328342 --skip-tests=$(CI_SKIP_TESTS ) \
@@ -340,19 +354,6 @@ coverage-run-js: ## Run JavaScript tests with coverage.
340354 TEST_CI_ARGS=" $( TEST_CI_ARGS) --type=coverage" $(MAKE ) jstest
341355 $(MAKE ) coverage-report-js
342356
343- TRACE_PROCESSOR_SHELL_PATH ?= tools/perfetto/trace_processor_shell
344-
345- # The downloaded copy has to match the vendored perfetto, so a version bump
346- # re-downloads it. An overridden path is a build we do not manage and may not
347- # be writable, so it gets no prerequisite and is left alone once it exists.
348- ifeq ($(TRACE_PROCESSOR_SHELL_PATH ) ,tools/perfetto/trace_processor_shell)
349- TRACE_PROCESSOR_SHELL_DEPS = deps/perfetto/VERSION
350- endif
351-
352- # Set TRACE_PROCESSOR_SHELL_PATH=/dev/null to disable the download
353- $(TRACE_PROCESSOR_SHELL_PATH ) : $(TRACE_PROCESSOR_SHELL_DEPS )
354- @tools/perfetto/get_trace_processor $@
355-
356357.PHONY : test
357358# This does not run tests of third-party libraries inside deps.
358359test : all # # Run default tests and build docs.
0 commit comments