Files
CMake/Tests/RunCMake/FileAPI/configureLog-v1-check.py
Ben Boeckel 8df9819839 find_package: generate find_package-v1 configure log events
Since `find_package` is far more complex than other `find_*` commands,
it gets its own event.

Closes: #24833
2025-05-09 16:46:43 +02:00

22 lines
796 B
Python

from check_index import *
import os
def check_objects(o):
assert is_list(o)
assert len(o) == 1
check_index_object(o[0], "configureLog", 1, 0, check_object_configureLog)
def check_object_configureLog(o):
assert sorted(o.keys()) == ["eventKindNames", "kind", "path", "version"]
# The "kind" and "version" members are handled by check_index_object.
path = o["path"]
assert matches(path, "^.*/CMakeFiles/CMakeConfigureLog\\.yaml$")
assert os.path.exists(path)
eventKindNames = o["eventKindNames"]
assert is_list(eventKindNames)
assert sorted(eventKindNames) == ["find-v1", "find_package-v1", "message-v1", "try_compile-v1", "try_run-v1"]
assert is_dict(index)
assert sorted(index.keys()) == ["cmake", "objects", "reply"]
check_objects(index["objects"])