diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-02-07 15:58:10 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-02-07 15:58:10 (GMT) |
commit | 1605fcbbd95319cc744ec17e49069e01ed681617 (patch) | |
tree | d1c0037b85f960e38c906f370224057c8981cfb0 /Tests/RunCMake/FileAPI | |
parent | 3844e2ae4c9a35992917beb0edd1795a436169bf (diff) | |
download | CMake-1605fcbbd95319cc744ec17e49069e01ed681617.zip CMake-1605fcbbd95319cc744ec17e49069e01ed681617.tar.gz CMake-1605fcbbd95319cc744ec17e49069e01ed681617.tar.bz2 |
FileAPI test: Add infrastructure for reading JSON test data
Diffstat (limited to 'Tests/RunCMake/FileAPI')
-rw-r--r-- | Tests/RunCMake/FileAPI/codemodel-v2-check.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py index de6253f..00a0e9d 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py +++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py @@ -1,8 +1,14 @@ from check_index import * +import json import sys import os +def read_codemodel_json_data(filename): + abs_filename = os.path.join(os.path.dirname(os.path.realpath(__file__)), "codemodel-v2-data", filename) + with open(abs_filename, "r") as f: + return json.load(f) + def check_objects(o, g): assert is_list(o) assert len(o) == 1 |