Feat (cli): test run and teardown

This commit is contained in:
Grail Finder
2026-03-16 09:44:28 +03:00
parent df04d8c21c
commit 3d44686a51
6 changed files with 230 additions and 30 deletions

25
cli-tests/sort-text/run.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
LOG_FILE="$SCRIPT_DIR/${TIMESTAMP}_run.log"
exec > "$LOG_FILE" 2>&1
echo "=== Running teardown ==="
"$SCRIPT_DIR/teardown.sh"
echo ""
echo "=== Running setup ==="
"$SCRIPT_DIR/setup.sh"
echo ""
echo "=== Running task ==="
TASK=$(cat "$SCRIPT_DIR/task.txt")
cd /home/grail/projects/plays/goplays/gf-lt
go run . -cli -msg "$TASK"
echo ""
echo "=== Done ==="
echo "Log file: $LOG_FILE"