generated from coulomb/repo-seed
local OpenCMIS TCK runtime
This commit is contained in:
37
scripts/bootstrap_opencmis_tck.py
Normal file
37
scripts/bootstrap_opencmis_tck.py
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Check and optionally resolve the local OpenCMIS TCK runtime."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from open_cmis_tck.bootstrap import check_runtime, default_summary_path
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
"--extension-root",
|
||||
type=Path,
|
||||
default=Path(__file__).resolve().parents[1],
|
||||
)
|
||||
parser.add_argument("--output", type=Path)
|
||||
parser.add_argument("--resolve", action="store_true")
|
||||
parser.add_argument("--timeout-seconds", type=int, default=300)
|
||||
args = parser.parse_args()
|
||||
|
||||
output = args.output or default_summary_path(args.extension_root)
|
||||
summary = check_runtime(
|
||||
args.extension_root,
|
||||
output,
|
||||
resolve=args.resolve,
|
||||
timeout_seconds=args.timeout_seconds,
|
||||
)
|
||||
print(json.dumps(summary, indent=2, sort_keys=True))
|
||||
return 0 if summary["status"] == "ready" else 2
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user