Files
zeekay bcbea6fbf4 hack: drop Argo wording, fix stale upstream-fork paths it left behind
Renames local identifiers (argoClientSet/argoDB/argoappv1 etc.) and
comments to our own voice. Also fixes real bugs the old wording was
masking: update-manifests.sh's image detection still compared against
quay.io/argoproj/argocd so it never matched our ghcr.io/hanzoai/cd
image; the codegen scripts pointed GOPATH at the upstream import path;
start-redis-with-password.sh grepped a manifest filename that no
longer exists; generate-actions-list.sh linked generated docs at our
own repo now instead of upstream's file layout.
2026-09-05 01:11:22 -07:00

35 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
set -eux -o pipefail
# check for local installation of go-junit-report otherwise install locally
which go-junit-report || go install github.com/jstemmer/go-junit-report@latest
# check for local installation of gotestsum otherwise install locally
which gotestsum || go install gotest.tools/gotestsum@latest
TEST_RESULTS=${TEST_RESULTS:-test-results}
TEST_FLAGS=${TEST_FLAGS:-}
DIST_DIR=${DIST_DIR:-dist}
# Add DIST_DIR to PATH so locally built binaries are found first
export PATH="${DIST_DIR}:${PATH}"
if test "${CD_TEST_PARALLELISM:-}" != ""; then
TEST_FLAGS="$TEST_FLAGS -p $CD_TEST_PARALLELISM"
fi
if test "${CD_TEST_PARALLEL:-}" != ""; then
TEST_FLAGS="$TEST_FLAGS -parallel $CD_TEST_PARALLEL"
fi
if test "${CD_TEST_VERBOSE:-}" != ""; then
TEST_FLAGS="$TEST_FLAGS -v"
fi
mkdir -p "$TEST_RESULTS"
# `TEST_FLAGS` cannot be quoted as empty needs to evaluate to 0 arguments.
# `TEST_FLAGS` cannot be turned into array without backward incompatible change of script input
# shellcheck disable=SC2086
GODEBUG="tarinsecurepath=0,zipinsecurepath=0" \
gotestsum --rerun-fails-report=rerunreport.txt --junitfile="$TEST_RESULTS/junit.xml" --format=testname \
--rerun-fails="$RERUN_FAILS" --packages="${TEST_MODULE:-$PACKAGES}" -- -cover $TEST_FLAGS "$@"