reorganize: move all test scripts to tests/ directory
- Moved 8 root-level test scripts + 2 from bot/ to tests/ - Moved run_rocinante_test.sh runner script to tests/ - Added tests/README.md documenting each test's purpose, type, and requirements - Added test_pfp_context.py and test_rocinante_comparison.py (previously untracked)
This commit is contained in:
36
tests/run_rocinante_test.sh
Executable file
36
tests/run_rocinante_test.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
# Run the Rocinante comparison test inside the miku-bot container
|
||||
# (which has aiohttp, docker access, and network connectivity to Cat)
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
TEST_FILE="$SCRIPT_DIR/test_rocinante_comparison.py"
|
||||
CONTAINER="miku-bot"
|
||||
LOG_FILE="/tmp/test_rocinante_comparison.log"
|
||||
|
||||
echo "=== Rocinante-X 12B Comparison Test ==="
|
||||
echo ""
|
||||
|
||||
# 1. Copy test script into the container
|
||||
echo "[1/4] Copying test script into $CONTAINER..."
|
||||
docker cp "$TEST_FILE" "$CONTAINER:/tmp/test_rocinante_comparison.py"
|
||||
|
||||
# 2. Restart llama-swap-amd to pick up the new rocinante config
|
||||
echo "[2/4] Restarting llama-swap-amd to load new config..."
|
||||
docker restart llama-swap-amd
|
||||
echo " Waiting 10s for llama-swap-amd to be ready..."
|
||||
sleep 10
|
||||
|
||||
# 3. Run the test inside the container (interactive for live output)
|
||||
echo "[3/4] Running test inside $CONTAINER (this will take a while)..."
|
||||
echo ""
|
||||
docker exec -t "$CONTAINER" python3 /tmp/test_rocinante_comparison.py
|
||||
|
||||
# 4. Copy log back to host
|
||||
echo ""
|
||||
echo "[4/4] Copying log file to host..."
|
||||
docker cp "$CONTAINER:$LOG_FILE" "$LOG_FILE"
|
||||
|
||||
echo ""
|
||||
echo "✓ Done! Log file: $LOG_FILE"
|
||||
echo " Compare with: diff <(cat /tmp/test_comparison_live.log) <(cat $LOG_FILE)"
|
||||
Reference in New Issue
Block a user