summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FileAPI/codemodel-v2-check.py
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2021-07-13 18:20:07 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2021-10-27 19:17:23 (GMT)
commit3c3698b0e47277db2721cd78e499f4b4a22f7e00 (patch)
tree1fe75dffd2a900052835d2bd220f6ee233d9869f /Tests/RunCMake/FileAPI/codemodel-v2-check.py
parent8a09723bffe41989c49991e1e98c4e33543c6307 (diff)
downloadCMake-3c3698b0e47277db2721cd78e499f4b4a22f7e00.zip
CMake-3c3698b0e47277db2721cd78e499f4b4a22f7e00.tar.gz
CMake-3c3698b0e47277db2721cd78e499f4b4a22f7e00.tar.bz2
FileAPI: Add information on file set installers
Diffstat (limited to 'Tests/RunCMake/FileAPI/codemodel-v2-check.py')
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-check.py31
1 files changed, 30 insertions, 1 deletions
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
index 92a64f9..b31088d 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
@@ -12,7 +12,7 @@ def read_codemodel_json_data(filename):
def check_objects(o, g):
assert is_list(o)
assert len(o) == 1
- check_index_object(o[0], "codemodel", 2, 3, check_object_codemodel(g))
+ check_index_object(o[0], "codemodel", 2, 4, check_object_codemodel(g))
def check_backtrace(t, b, backtrace):
btg = t["backtraceGraph"]
@@ -188,6 +188,31 @@ def check_directory(c):
expected_keys.append("runtimeDependencySetType")
assert is_string(a["runtimeDependencySetType"], e["runtimeDependencySetType"])
+ if e.get("fileSetName", None) is not None:
+ expected_keys.append("fileSetName")
+ assert is_string(a["fileSetName"], e["fileSetName"])
+
+ if e.get("fileSetType", None) is not None:
+ expected_keys.append("fileSetType")
+ assert is_string(a["fileSetType"], e["fileSetType"])
+
+ if e.get("fileSetDirectories", None) is not None:
+ expected_keys.append("fileSetDirectories")
+ assert is_list(a["fileSetDirectories"])
+ assert len(a["fileSetDirectories"]) == len(e["fileSetDirectories"])
+ for ad, ed in zip(a["fileSetDirectories"], e["fileSetDirectories"]):
+ assert matches(ad, ed)
+
+ if e.get("fileSetTarget", None) is not None:
+ expected_keys.append("fileSetTarget")
+ et = e["fileSetTarget"]
+ at = a["fileSetTarget"]
+ assert is_dict(at)
+ assert sorted(at.keys()) == ["id", "index"]
+ assert matches(at["id"], et["id"])
+ assert is_int(at["index"])
+ assert c["targets"][at["index"]]["name"] == et["index"]
+
if e["backtrace"] is not None:
expected_keys.append("backtrace")
check_backtrace(d, a["backtrace"], e["backtrace"])
@@ -628,6 +653,7 @@ def gen_check_directories(c, g):
read_codemodel_json_data("directories/dir.json"),
read_codemodel_json_data("directories/dir_dir.json"),
read_codemodel_json_data("directories/external.json"),
+ read_codemodel_json_data("directories/fileset.json"),
]
if matches(g["name"], "^Visual Studio "):
@@ -729,6 +755,9 @@ def gen_check_targets(c, g, inSource):
read_codemodel_json_data("targets/all_build_external.json"),
read_codemodel_json_data("targets/zero_check_external.json"),
read_codemodel_json_data("targets/generated_exe.json"),
+
+ read_codemodel_json_data("targets/c_headers_1.json"),
+ read_codemodel_json_data("targets/c_headers_2.json"),
]
if cxx_compiler_id in ['Clang', 'AppleClang', 'LCC', 'GNU', 'Intel', 'IntelLLVM', 'MSVC', 'Embarcadero'] and g["name"] != "Xcode":