42 lines
1.0 KiB
Bash
Executable File
42 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
if [ "$#" -gt 1 ]; then
|
|
echo "usage: scripts/qa/test-failure-path-fixtures.sh [format|sidecar|all]" >&2
|
|
exit 2
|
|
fi
|
|
|
|
scope="${1:-all}"
|
|
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
|
|
run_fixture() {
|
|
local label="$1"
|
|
local script_path="$2"
|
|
|
|
echo "==> ${label}"
|
|
"$script_path"
|
|
}
|
|
|
|
case "$scope" in
|
|
format)
|
|
run_fixture "failure-path markdown format fixture" \
|
|
"$root_dir/scripts/qa/test-failure-path-evidence-format.sh"
|
|
;;
|
|
sidecar)
|
|
run_fixture "failure-path sidecar fixture" \
|
|
"$root_dir/scripts/qa/test-failure-path-evidence-sidecar.sh"
|
|
;;
|
|
all)
|
|
run_fixture "failure-path markdown format fixture" \
|
|
"$root_dir/scripts/qa/test-failure-path-evidence-format.sh"
|
|
run_fixture "failure-path sidecar fixture" \
|
|
"$root_dir/scripts/qa/test-failure-path-evidence-sidecar.sh"
|
|
;;
|
|
*)
|
|
echo "error: scope must be one of: format, sidecar, all" >&2
|
|
exit 3
|
|
;;
|
|
esac
|
|
|
|
echo "all requested failure-path fixtures passed"
|