forked from mtusi2026/mtusi2026lab2
28 lines
937 B
Bash
Executable File
28 lines
937 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
cd "$(dirname "$0")/.."
|
|
header() { echo "date: $(date -u +%FT%TZ) commit: $(git rev-parse --short HEAD)"; }
|
|
make_() { make --no-print-directory "$@" 2>&1; }
|
|
status=0
|
|
{
|
|
header
|
|
for target in check validate lint; do
|
|
echo "\$ make $target"
|
|
make_ $target
|
|
done
|
|
echo "\$ make test"
|
|
make_ test BASE_URL="$1"
|
|
} > evidence/checks.txt
|
|
{
|
|
header
|
|
echo "\$ make student-test PYTEST_ARGS=-v"
|
|
make_ student-test PYTEST_ARGS=-v
|
|
for expr in rolls_back "sessions or bearer" "expire or logout" user_id outsider cursor "body_limit or chunked" cache pool; do
|
|
echo "\$ make student-test PYTEST_ARGS=\"-v -k '$expr'\""
|
|
out=$(make_ student-test PYTEST_ARGS="-v -k '$expr'") || status=1
|
|
printf '%s\n' "$out" | grep -E 'PASSED|FAILED|ERROR|passed|failed'
|
|
done
|
|
} > evidence/student-tests.txt
|
|
echo "evidence/{checks,student-tests}.txt обновлены"
|
|
exit $status
|