forked from mtusi2026/mtusi2026lab3
20 lines
556 B
Bash
Executable File
20 lines
556 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
mkdir -p evidence
|
|
load_json=evidence/rolling-update-load.json
|
|
load_log=evidence/rolling-update-load.log
|
|
update_log=evidence/rolling-update.log
|
|
python3 tests/load.py --duration 60 --concurrency 4 --output "$load_json" >"$load_log" 2>&1 &
|
|
load_pid=$!
|
|
sleep 2
|
|
set +e
|
|
bash scripts/rolling-update.sh 2>&1 | tee "$update_log"
|
|
update_status=${PIPESTATUS[0]}
|
|
set -e
|
|
if ! wait "$load_pid"; then
|
|
printf 'Background load scenario failed; inspect %s.\n' "$load_log" >&2
|
|
exit 1
|
|
fi
|
|
exit "$update_status"
|