mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
ci: do not exit when an error happens inside the section
Let CI handle that case as it did before. The only thing which needs to be done by the error() function is to get out of the section.
Fixes the issue where a job is not saving artifacts after failure.
Fixes: 4cc0cec473 ("ci: implement unified sections")
Acked-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21715>
This commit is contained in:
parent
944a3af531
commit
d79d62c638
1 changed files with 4 additions and 7 deletions
|
|
@ -26,11 +26,8 @@ function error {
|
|||
[ "$state_x" -eq 0 ] || set -x
|
||||
}
|
||||
|
||||
function trap_exit {
|
||||
local ret=$1
|
||||
shift
|
||||
error $CURRENT_SECTION: $*
|
||||
exit $ret
|
||||
function trap_err {
|
||||
error ${CURRENT_SECTION:-'unknown-section'}: ret code: $*
|
||||
}
|
||||
|
||||
function build_section_start {
|
||||
|
|
@ -88,7 +85,7 @@ function uncollapsed_section_switch {
|
|||
|
||||
export -f x_off
|
||||
export -f error
|
||||
export -f trap_exit
|
||||
export -f trap_err
|
||||
export -f build_section_start
|
||||
export -f section_start
|
||||
export -f build_section_end
|
||||
|
|
@ -97,4 +94,4 @@ export -f section_switch
|
|||
export -f uncollapsed_section_switch
|
||||
|
||||
set -E
|
||||
trap 'trap_exit $?' ERR
|
||||
trap 'trap_err $?' ERR
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue