generated from coulomb/repo-seed
Log analysis functionality for self-assessment
This commit is contained in:
37
scripts/opencmis_log_review.py
Normal file
37
scripts/opencmis_log_review.py
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Generate OpenCMIS TCK warning, stderr, and skip review reports."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "src"))
|
||||
|
||||
from open_cmis_tck.log_review import write_log_review # noqa: E402
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--run-dir", type=Path, required=True)
|
||||
parser.add_argument("--output-dir", type=Path)
|
||||
parser.add_argument("--policy", type=Path)
|
||||
parser.add_argument("--previous-run-dir", type=Path)
|
||||
parser.add_argument("--server-log", type=Path, action="append", default=[])
|
||||
args = parser.parse_args()
|
||||
|
||||
result = write_log_review(
|
||||
args.run_dir,
|
||||
output_dir=args.output_dir,
|
||||
policy_path=args.policy,
|
||||
previous_run_dir=args.previous_run_dir,
|
||||
server_log_paths=args.server_log,
|
||||
)
|
||||
print(json.dumps(result, indent=2, sort_keys=True))
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user