From b7221e7f522c0165685d352f0320e99c2dd4bfe8 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Mon, 12 Aug 2024 17:50:51 +0200 Subject: [PATCH 1/2] build: don't clean obj.target directory if it doesn't exist This can happen to ninja builds, which would then throw an error instead of being a noop if the command is executed. --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 330cb1df31cc71..0f5e77cc83abcf 100644 --- a/Makefile +++ b/Makefile @@ -266,7 +266,9 @@ coverage-build-js: .PHONY: coverage-test coverage-test: coverage-build - $(FIND) out/$(BUILDTYPE)/obj.target -name "*.gcda" -type f -exec $(RM) {} \; + @if [ -d "out/Release/obj.target" ]; then \ + $(FIND) out/$(BUILDTYPE)/obj.target -name "*.gcda" -type f -exec $(RM) {}; \ + fi -NODE_V8_COVERAGE=coverage/tmp \ TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS) $(MAKE) coverage-report-js From f0cbf628c87128d08fa76e6b888198ef7fa3a6af Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Mon, 19 Aug 2024 13:53:09 +0200 Subject: [PATCH 2/2] fixup! build: don't clean obj.target directory if it doesn't exist --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0f5e77cc83abcf..bdf22fe2af31c4 100644 --- a/Makefile +++ b/Makefile @@ -241,8 +241,10 @@ coverage-clean: $(RM) -r node_modules $(RM) -r gcovr $(RM) -r coverage/tmp - $(FIND) out/$(BUILDTYPE)/obj.target \( -name "*.gcda" -o -name "*.gcno" \) \ - -type f -exec $(RM) {} \; + @if [ -d "out/Release/obj.target" ]; then \ + $(FIND) out/$(BUILDTYPE)/obj.target \( -name "*.gcda" -o -name "*.gcno" \) \ + -type f -exec $(RM) {};\ + fi .PHONY: coverage # Build and test with code coverage reporting. HTML coverage reports will be