Debian Codegraph @

Tests/RunCMake/CTestCommandLine/show-only_json_validate_schema.py

raw symbols SCIP
1 import json
2 import jsonschema
3 import os.path
4 import sys
5
6
7 with open(sys.argv[1], "r", encoding="utf-8-sig") as f:
8 contents = json.load(f)
9
10 schema_file = os.path.join(
11 os.path.dirname(__file__),
12 "..", "..", "..", "Help", "manual", "ctest", "show-only-schema.json")
13 with open(schema_file, "r", encoding="utf-8") as f:
14 schema = json.load(f)
15
16 jsonschema.validate(contents, schema)