#!/usr/bin/env bash # Build every example and the smoke test. Any dirty build fails the run. # # ./scripts/test.sh # # This is a regression test for assets/supertensor.sty: the examples exercise # faces, stacks, index faces, every pattern, shared caption lanes, connectors, # the meaning box and the signature. set -uo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" fail=0 for f in "$ROOT"/tests/*.tex "$ROOT"/examples/*.tex; do [[ -e "$f" ]] || continue name="$(basename "$f")" if "$ROOT/scripts/build.sh" "$f" >/dev/null 2>&1; then echo " ok $name" else echo " FAIL $name" fail=$((fail+1)) fi done if [[ $fail -gt 0 ]]; then echo "$fail failing figure(s); rerun scripts/build.sh on one to see why" >&2 exit 1 fi echo "all figures build clean"