configureLog-v1-check.py 777 B

123456789101112131415161718192021
  1. from check_index import *
  2. import os
  3. def check_objects(o):
  4. assert is_list(o)
  5. assert len(o) == 1
  6. check_index_object(o[0], "configureLog", 1, 0, check_object_configureLog)
  7. def check_object_configureLog(o):
  8. assert sorted(o.keys()) == ["eventKindNames", "kind", "path", "version"]
  9. # The "kind" and "version" members are handled by check_index_object.
  10. path = o["path"]
  11. assert matches(path, "^.*/CMakeFiles/CMakeConfigureLog\\.yaml$")
  12. assert os.path.exists(path)
  13. eventKindNames = o["eventKindNames"]
  14. assert is_list(eventKindNames)
  15. assert sorted(eventKindNames) == ["find-v1", "message-v1", "try_compile-v1", "try_run-v1"]
  16. assert is_dict(index)
  17. assert sorted(index.keys()) == ["cmake", "objects", "reply"]
  18. check_objects(index["objects"])