Add the rspec_section function
Context
Closes #434850 (closed)
What does this MR do and why?
- Makes the
section_start
collapsed
parameter configurable:
# Before
section_start "my-section-tag" "My section"
# After
section_start "my-section-tag" "My section" # collapsed by default
section_start "my-section-tag" "My section" "false" # uncollapsed
- Adds the
rspec_section
shell function:
# Before
section_start "rspec" "RSpec" "false"
bin/rspec
section_end "rspec"
# After
rspec_section bin/rspec
Test it locally
docker run -it ruby:3.1-alpine3.16 sh
function rspec_section() {
echo "$@"
"$@"
}
function rspec_parallelized_job() {
echo "First param: ${1}"
echo "Second param: ${2}"
}
export RSPEC_FAIL_FAST_THRESHOLD=30
$ rspec_section rspec_parallelized_job "--fail-fast=${RSPEC_FAIL_FAST_THRESHOLD}" "--tag ~quarantine --tag ~level:background_migration --tag ~click_house --tag ~real_ai_request"
rspec_parallelized_job --fail-fast=30 --tag ~quarantine --tag ~level:background_migration --tag ~click_house --tag ~real_ai_request
First param: --fail-fast=30
Second param: --tag ~quarantine --tag ~level:background_migration --tag ~click_house --tag ~real_ai_request
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by David Dieulivol