← Files Zuora Coding AgentARCHIVED FILE

templates/uat-test-starter/uat/execution/scripts/resolve_uat_root.py

725 Bytes · Oct 3, 2026 · 06:32 UTC

↓ Download file

#!/usr/bin/env python3
"""Print resolved git root and UAT workspace root as JSON."""

from __future__ import annotations

import argparse
import json
import sys
from pathlib import Path

SCRIPT_DIR = Path(__file__).resolve().parent
sys.path.insert(0, str(SCRIPT_DIR.parent / "tests"))

from test_utils.uat_root import layout_info  # noqa: E402


def main():
    parser = argparse.ArgumentParser(description="Resolve UAT workspace root")
    parser.add_argument("--git-root", default=None, help="Git project root (default: auto-detect)")
    args = parser.parse_args()
    git = Path(args.git_root).resolve() if args.git_root else None
    print(json.dumps(layout_info(git), indent=2))


if __name__ == "__main__":
    main()

SHA-256: f3e55d8643007f141c54a725c798cfa927b91604ef43ee05149f5ea66ce79bff