2
0

Merge commit 'e8675243442b2fb1044235af47affad11f2ca54c' into develop

Este cometimento está contido em:
systems-assistant[bot]
2025-08-05 15:07:38 +00:00
ascendente 14b0b2a7d7 e867524344
cometimento 3b008fae9c
+1 -32
Ver ficheiro
@@ -7,39 +7,8 @@ import yaml
@pytest.mark.autogen_config
def test_modification_time():
# Ensure modification time of utils/unified_config.yaml is older than
# utils/autogen_hash.yaml
# docs/data/metrics_description.yaml and
# src/rocprof_compute_soc/analysis_configs/gfx*/*.yaml
unified_config_path = Path("utils/unified_config.yaml")
hash_path = Path("utils/autogen_hash.yaml")
docs_config_path = Path("docs/data/metrics_description.yaml")
analysis_config_paths = list(
Path("src/rocprof_compute_soc/analysis_configs").glob("gfx*/*.yaml")
)
unified_config_time = unified_config_path.stat().st_mtime
def is_autogenerated(filepath):
# Autogenerated filepath should be newer than the unified config
# Autogenerated filepath can be older than unified config by at most a second due to file system delays
return unified_config_time - filepath.stat().st_mtime < 1
assert is_autogenerated(
hash_path
), f"{unified_config_path} is not older than {hash_path}"
assert is_autogenerated(
docs_config_path
), f"{unified_config_path} is not older than {docs_config_path}"
for analysis_config_path in analysis_config_paths:
assert is_autogenerated(
analysis_config_path
), f"{unified_config_path} is not older than {analysis_config_path}"
# Ensure hash map consistency
hash_path = Path("utils/autogen_hash.yaml")
with open(hash_path, "r") as f:
hash_map = yaml.safe_load(f)
for file, hash in hash_map.items():