Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/test_bif_mem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ plant() {
rm -rf "$tree"; mkdir -p "$tree/tests"
cp "$ROOT"/*.eigs "$tree/"
cp "$ROOT"/tests/*.eigs "$tree/tests/"
# EigenScript v0.43.0 (#1106): planted $TMP trees need eigs.json for imports
cp "$ROOT"/eigs.json "$tree/"
python3 - "$tree/orbit.eigs" "$needle" "$repl" <<'PY_END'
import sys
path, needle, repl = sys.argv[1], sys.argv[2], sys.argv[3]
Expand Down
4 changes: 4 additions & 0 deletions tests/test_bifurcation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ plant() {
rm -rf "$tree"; mkdir -p "$tree/tests"
cp logistic.eigs "$tree/"
cp tests/bifurcation_oracle.eigs "$tree/tests/"
# EigenScript v0.43.0 (#1106): import/load_file need project-root eigs.json
# (cwd no longer resolves). Without this, planted trees under $TMP die on
# `import logistic` before the oracle assertions can catch the fault.
cp eigs.json "$tree/"
python3 - "$tree/logistic.eigs" "$needle" "$repl" <<'PY'
import sys
path, needle, repl = sys.argv[1], sys.argv[2], sys.argv[3]
Expand Down
1 change: 1 addition & 0 deletions tests/test_lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ echo "PASS: all $N .eigs files lint clean"
echo "--- planted fault: an unused variable ---"
mkdir -p "$TMP/fault/tests"
cp ./*.eigs "$TMP/fault/"
cp eigs.json "$TMP/fault/"
printf 'DEAD_CONSTANT is 42\nprint of "hi"\n' > "$TMP/fault/planted.eigs"
if lint_tree "$TMP/fault" quiet; then
echo "FAIL: an unused variable passed the lint gate — the gate isn't running"
Expand Down
13 changes: 9 additions & 4 deletions tests/test_orbit_hist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"

TMP="$(mktemp -d)"
trap "rm -rf '$TMP'" EXIT

field() { echo "$1" | grep -E "^$2 " | awk '{print $2}'; }

Expand Down Expand Up @@ -62,9 +61,15 @@ check "$OUT" || exit 1
echo "PASS: dump path keeps the whole trajectory; interactive path stays bounded and display-identical"

# Planted fault: drop the cap and the bound assertion must catch it.
sed 's/^trimmed.cap is orbit.HIST_CAP$/trimmed.cap is 0/' tests/orbit_hist_dump.eigs > "$TMP/nocap.eigs"
cmp -s tests/orbit_hist_dump.eigs "$TMP/nocap.eigs" && { echo "FAIL: planted-fault substitution did not apply"; exit 1; }
FOUT=$("$EIGS" "$TMP/nocap.eigs" 2>&1)
# Write under the repo (not $TMP): EigenScript v0.43.0 (#1106) resolves
# `import orbit` via file-relative then project-root (eigs.json). A copy
# under /tmp has neither, so the fault run died before the checker ran and
# `set -e` turned that into a silent suite red on the v0.43.0 pin bump.
PLANT="tests/.nocap_orbit_hist.eigs"
trap "rm -rf '$TMP' '$PLANT'" EXIT
sed 's/^trimmed.cap is orbit.HIST_CAP$/trimmed.cap is 0/' tests/orbit_hist_dump.eigs > "$PLANT"
cmp -s tests/orbit_hist_dump.eigs "$PLANT" && { echo "FAIL: planted-fault substitution did not apply"; exit 1; }
FOUT=$("$EIGS" "$PLANT" 2>&1)
if check "$FOUT" quiet; then
echo "FAIL: planted fault (cap removed) passed the bound check — the checker can't discriminate"
exit 1
Expand Down