test: add cmd/bd helper coverage and stabilize test runner

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
Jordan Hubbard
2025-12-26 17:55:51 -04:00
parent 28f2c76589
commit 0b6ec57928
8 changed files with 318 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ VERBOSE="${TEST_VERBOSE:-}"
RUN_PATTERN="${TEST_RUN:-}"
COVERAGE="${TEST_COVER:-}"
COVERPROFILE="${TEST_COVERPROFILE:-/tmp/beads.coverage.out}"
COVERPKG="${TEST_COVERPKG:-./...}"
COVERPKG="${TEST_COVERPKG:-}"
# Parse arguments
PACKAGES=()
@@ -81,7 +81,10 @@ if [[ -n "$RUN_PATTERN" ]]; then
fi
if [[ -n "$COVERAGE" ]]; then
CMD+=(-covermode=atomic -coverpkg "$COVERPKG" -coverprofile "$COVERPROFILE")
CMD+=(-covermode=atomic -coverprofile "$COVERPROFILE")
if [[ -n "$COVERPKG" ]]; then
CMD+=(-coverpkg "$COVERPKG")
fi
fi
CMD+=("${PACKAGES[@]}")