Skip to content

8345874: Run make doctor automatically on failed CI builds #24485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions make/Init.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,14 @@ on-failure:
$(call PrintFailureReports)
$(call PrintBuildLogFailures)
$(call ReportProfileTimes)
$(ECHO) "HELP: Run 'make doctor' to diagnose build problems."
$(ECHO) ""
ifeq ($(BUILD_ENV), ci)
$(ECHO) ""
$(ECHO) "=== Running 'make doctor' [ci build] ==="
$(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk doctor
else
$(ECHO) "HELP: Run 'make doctor' to diagnose build problems."
$(ECHO) ""
endif
ifneq ($(COMPARE_BUILD), )
$(call CleanupCompareBuild)
endif
Expand Down
3 changes: 3 additions & 0 deletions make/autoconf/spec.gmk.template
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ endif
SYSROOT_CFLAGS := @SYSROOT_CFLAGS@
SYSROOT_LDFLAGS := @SYSROOT_LDFLAGS@

# dev or ci
BUILD_ENV := @BUILD_ENV@

# The top-level directory of the source repository
TOPDIR := @TOPDIR@
# Usually the top level directory, but could be something else if a custom
Expand Down