mirror of
https://github.com/SHOGGOTH-SECTOR/sica-fondt.git
synced 2026-07-31 08:06:26 +00:00
Delete run_tests.sh
This commit is contained in:
parent
2ccb30bf33
commit
2c69102395
@ -1,41 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Run every endocrine / Drive-Box R test from the repository root so that the
|
|
||||||
# repo-root-relative source() paths inside each test resolve correctly.
|
|
||||||
set -uo pipefail
|
|
||||||
|
|
||||||
# cd to repo root (this script lives at <root>/core/src/endocrine/run_tests.sh)
|
|
||||||
cd "$(dirname "$0")/../../.." || exit 2
|
|
||||||
|
|
||||||
if ! command -v Rscript >/dev/null 2>&1; then
|
|
||||||
echo "ERROR: Rscript not found. Install with: sudo apt-get install -y r-base-core" >&2
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
status=0
|
|
||||||
shopt -s nullglob
|
|
||||||
# Collect test files, excluding the harness itself (test_framework.R).
|
|
||||||
tests=()
|
|
||||||
for f in core/src/endocrine/test_*.R; do
|
|
||||||
[ "$(basename "$f")" = "test_framework.R" ] && continue
|
|
||||||
tests+=("$f")
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ ${#tests[@]} -eq 0 ]; then
|
|
||||||
echo "No test_*.R files found under core/src/endocrine/." >&2
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
for t in "${tests[@]}"; do
|
|
||||||
echo "== $t =="
|
|
||||||
if ! Rscript "$t"; then
|
|
||||||
status=1
|
|
||||||
fi
|
|
||||||
echo
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ $status -eq 0 ]; then
|
|
||||||
echo "ALL ENDOCRINE TESTS PASSED"
|
|
||||||
else
|
|
||||||
echo "SOME ENDOCRINE TESTS FAILED"
|
|
||||||
fi
|
|
||||||
exit $status
|
|
||||||
Loading…
x
Reference in New Issue
Block a user