#!/bin/bash
BASE="/Users/marcelkurvers/Development/local-testing-agent"
ENGINE="$BASE/testing_engine"
echo "Checking folder structure..."
if [ -d "$ENGINE" ]; then
echo "OK: testing_engine folder exists"
else
echo "ERROR: testing_engine folder missing"
exit 1
fi
echo "Checking engine files..."
for f in "__init__.py" "file_scanner.py" "unit_test_generator.py" "pipeline.py"; do
if [ ! -f "$ENGINE/$f" ]; then
echo "ERROR: Missing $f"
exit 1
fi
done
echo "OK: engine files found"
echo "Checking root __init__.py..."
if [ -f "$BASE/__init__.py" ]; then
echo "ERROR: Root __init__.py should not exist"
exit 1
else
echo "OK: no root __init__.py"
fi
echo "Testing Python imports..."
source "$BASE/.venv/bin/activate"
python3 - << EOF
import sys
from pathlib import Path
base = Path("$BASE")
print("Base in sys.path:", str(base) in sys.path)
try:
import testing_engine
print("OK: testing_engine imported")
from testing_engine import full_test_pipeline
print("OK: full_test_pipeline available")
except Exception as e:
print("ERROR during import:", e)
sys.exit(1)
EOF
echo "Running dry-run of full_test_pipeline..."
python3 - << EOF
from testing_engine import full_test_pipeline
try:
result = full_test_pipeline(project_root="$BASE")
print("Pipeline executed OK")
print("Returned keys:", list(result.keys()))
except Exception as e:
print("Pipeline ERROR:", e)
sys.exit(1)
EOF
echo "All checks completed."