Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 467ac3a

Browse filesBrowse files
joyeecheungRafaelGSS
authored andcommitted
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. PR-URL: #54337 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
1 parent 8a4f8a9 commit 467ac3a
Copy full SHA for 467ac3a

File tree

Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Open diff view settings
Collapse file

‎Makefile‎

Copy file name to clipboardExpand all lines: Makefile
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,10 @@ coverage-clean:
241241
$(RM) -r node_modules
242242
$(RM) -r gcovr
243243
$(RM) -r coverage/tmp
244-
$(FIND) out/$(BUILDTYPE)/obj.target \( -name "*.gcda" -o -name "*.gcno" \) \
245-
-type f -exec $(RM) {} \;
244+
@if [ -d "out/Release/obj.target" ]; then \
245+
$(FIND) out/$(BUILDTYPE)/obj.target \( -name "*.gcda" -o -name "*.gcno" \) \
246+
-type f -exec $(RM) {};\
247+
fi
246248

247249
.PHONY: coverage
248250
# Build and test with code coverage reporting. HTML coverage reports will be
@@ -266,7 +268,9 @@ coverage-build-js:
266268

267269
.PHONY: coverage-test
268270
coverage-test: coverage-build
269-
$(FIND) out/$(BUILDTYPE)/obj.target -name "*.gcda" -type f -exec $(RM) {} \;
271+
@if [ -d "out/Release/obj.target" ]; then \
272+
$(FIND) out/$(BUILDTYPE)/obj.target -name "*.gcda" -type f -exec $(RM) {}; \
273+
fi
270274
-NODE_V8_COVERAGE=coverage/tmp \
271275
TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS)
272276
$(MAKE) coverage-report-js

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.