This commit is contained in:
nora 2023-10-15 20:24:23 +02:00
parent eb4d4b98f8
commit 5ef748c2c5
8 changed files with 265 additions and 196 deletions

21
runtest.sh Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
cargo build -p elven-wald --manifest-path "$SCRIPT_DIR/Cargo.toml"
export ELVEN_WALD="$SCRIPT_DIR/target/debug/elven-wald"
for dir in "$SCRIPT_DIR"/tests/*; do
echo "Testing $(basename "$dir")"
tmpdir=$(mktemp -d)
cp -r "$dir" "$tmpdir"
cd "$tmpdir/$(basename "$dir")" || exit 1
if ! bash "$dir/run.sh" >"$tmpdir/__stderr" 2>&1; then
cat "$tmpdir/__stderr"
echo "failed"
else
echo "passed"
fi
done