From eb34c059be70ee57661cd63a8929f31898f72209 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 8 Nov 2024 09:18:58 +0100 Subject: [PATCH] ci: use quiet alias for commands And set x_off again when nesting these functions but we're not done and we have more after. Fixes: d69bd583655974922e96 ("ci: consistently restore `-x` after temporarily disabling it") (cherry picked from commit e5708ab2b45c58ab33e866cb5688beee628ceabe) Part-of: --- .gitlab-ci/setup-test-env.sh | 19 +++++++++++-------- .pick_status.json | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci/setup-test-env.sh b/.gitlab-ci/setup-test-env.sh index a123201110d..dff17361479 100644 --- a/.gitlab-ci/setup-test-env.sh +++ b/.gitlab-ci/setup-test-env.sh @@ -50,13 +50,13 @@ function _build_section_start { alias build_section_start="x_off; _build_section_start" function _section_start { - _build_section_start "[collapsed=true]" $* + build_section_start "[collapsed=true]" $* x_restore } alias section_start="x_off; _section_start" function _uncollapsed_section_start { - _build_section_start "" $* + build_section_start "" $* x_restore } alias uncollapsed_section_start="x_off; _uncollapsed_section_start" @@ -69,7 +69,7 @@ function _build_section_end { alias build_section_end="x_off; _build_section_end" function _section_end { - _build_section_end $* + build_section_end $* x_restore } alias section_end="x_off; _section_end" @@ -77,9 +77,10 @@ alias section_end="x_off; _section_end" function _section_switch { if [ -n "$CURRENT_SECTION" ] then - _build_section_end $CURRENT_SECTION + build_section_end $CURRENT_SECTION + x_off fi - _build_section_start "[collapsed=true]" $* + build_section_start "[collapsed=true]" $* x_restore } alias section_switch="x_off; _section_switch" @@ -87,9 +88,10 @@ alias section_switch="x_off; _section_switch" function _uncollapsed_section_switch { if [ -n "$CURRENT_SECTION" ] then - _build_section_end $CURRENT_SECTION + build_section_end $CURRENT_SECTION + x_off fi - _build_section_start "" $* + build_section_start "" $* x_restore } alias uncollapsed_section_switch="x_off; _uncollapsed_section_switch" @@ -122,7 +124,8 @@ function error { ENDCOLOR="\e[0m" # we force the following to be not in a section if [ -n "${CURRENT_SECTION:-}" ]; then - _section_end $CURRENT_SECTION + section_end $CURRENT_SECTION + x_off fi CURR_MINSEC=$(get_current_minsec) diff --git a/.pick_status.json b/.pick_status.json index 77307664c02..7e7371279b7 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1194,7 +1194,7 @@ "description": "ci: use quiet alias for commands", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "d69bd583655974922e965e76a8f703c67d661b17", "notes": null