Skip to content
Open
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
13 changes: 13 additions & 0 deletions scripts/all-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,18 @@ pre_setup_keep_going () {
esac
}

## call_stack [NUMBER_OF_FRAMES_TO_OMIT]
## Print a function call stack.
## Start at the caller of this function, or $1 frames further up.
## Stop just before run_component.
call_stack () {
local i=$((${1:-0} + 1)) filename=
while [[ $i -lt ${#FUNCNAME[@]} && ${FUNCNAME[$i]} != run_component ]]; do
echo " ^ ${BASH_SOURCE[$i]#$PWD/}:${BASH_LINENO[$((i-1))]}:${FUNCNAME[$i]}"
((++i))
done
}

# This function runs if there is any error in a component.
# It must either exit with a nonzero status, or set
# last_failure_status to a nonzero value.
Expand Down Expand Up @@ -773,6 +785,7 @@ pre_setup_keep_going () {
text="$current_section: $failed_command -> $last_failure_status"
echo "${start_red}^^^^$text^^^^${end_color}" >&2
echo "$text" >>"$failure_summary_file"
call_stack 1

# If the command is fatal (configure or build command), stop this
# component. Otherwise (test command) keep the component running
Expand Down