41 lines
1.3 KiB
Bash
41 lines
1.3 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
REPORT_PATH="${1:-reports/task-plane-acceptance.json}"
|
|
mkdir -p "$(dirname "${REPORT_PATH}")"
|
|
export TASKPLANE_REPORT="${REPORT_PATH}"
|
|
export PYTHONPATH="${PYTHONPATH:-}:$(pwd)/active-runtime"
|
|
|
|
python3 - <<'PY'
|
|
import io
|
|
import json
|
|
import sys
|
|
import unittest
|
|
|
|
from pathlib import Path
|
|
from contextlib import redirect_stdout
|
|
|
|
report_path = Path(__import__('os').environ.get("TASKPLANE_REPORT", "reports/task-plane-acceptance.json"))
|
|
stream = io.StringIO()
|
|
|
|
loader = unittest.TestLoader()
|
|
suite = loader.discover("tests/task_plane/public_interface", pattern="test_*.py")
|
|
runner = unittest.TextTestRunner(stream=sys.stdout, verbosity=2)
|
|
result = runner.run(suite)
|
|
|
|
payload = {
|
|
"execution_status": "PARTIALLY_COMPLETED" if result.wasSuccessful() else "FAILED",
|
|
"tests_run": result.testsRun,
|
|
"failures": len(result.failures),
|
|
"errors": len(result.errors),
|
|
"skipped": len(result.skipped),
|
|
"multi_agent_shadow_verified": result.wasSuccessful(),
|
|
"production_side_effects": False,
|
|
"notification_delivery_status": "NOT_DELIVERED",
|
|
}
|
|
report_path.parent.mkdir(parents=True, exist_ok=True)
|
|
report_path.write_text(json.dumps(payload, indent=2) + "\n", encoding="utf-8")
|
|
print(f"acceptance_report={report_path}")
|
|
sys.exit(0 if result.wasSuccessful() else 1)
|
|
PY
|