Files
awesome-agentic-ai/master_test_runner.py
Tony_at_EON-DEV 099c21d245
Some checks failed
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
CI / update-argocd (push) Has been cancelled
CI / canary-promote (push) Has been cancelled
Agentic AI CI/CD / build-and-deploy (push) Has been cancelled
feat: Stabilize backend infrastructure, resolve dependencies, update planning, and introduce a master test runner for verification.
2026-02-24 12:28:07 +09:00

55 lines
1.9 KiB
Python

import os
import subprocess
import sys
def run_tests():
test_dir = "tests"
scripts = [f for f in os.listdir(test_dir) if (f.startswith("verify_") or f.startswith("test_")) and f.endswith(".py")]
scripts.sort()
results = []
print(f"🚀 Starting Master Test Runner on {len(scripts)} scripts...")
print("-" * 50)
for script in scripts:
script_path = os.path.join(test_dir, script)
print(f"Running {script}...", end=" ", flush=True)
try:
# We use a timeout to prevent hanging tests
result = subprocess.run(
[sys.executable, script_path],
capture_output=True,
text=True,
timeout=30
)
if result.returncode == 0:
print("✅ PASSED")
results.append((script, "PASSED", ""))
else:
print("❌ FAILED")
results.append((script, "FAILED", result.stderr or result.stdout))
except subprocess.TimeoutExpired:
print("⏳ TIMEOUT")
results.append((script, "TIMEOUT", "Script took longer than 30 seconds"))
except Exception as e:
print("💥 ERROR")
results.append((script, "ERROR", str(e)))
print("-" * 50)
print("📊 Final Report:")
passed = sum(1 for r in results if r[1] == "PASSED")
failed = sum(1 for r in results if r[1] != "PASSED")
print(f"Total: {len(scripts)} | Passed: {passed} | Failed: {failed}")
if failed > 0:
print("\n❌ Failures Summary:")
for script, status, error in results:
if status != "PASSED":
print(f" - {script}: {status}")
# Print last few lines of error if available
if error:
print(f" Error: {error.strip().splitlines()[-1] if error.strip() else 'No specific error message'}")
if __name__ == "__main__":
run_tests()