mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-17 17:03:27 -05:00
fix: write the truth model and clone map atomically
This commit is contained in:
1 parent
53625156d6
commit
45b58d2417
3 files changed
+61
-17
No files matched your search
@@ -21,6 +21,7 @@ from common import (
|
||||
load_platform_config,
|
||||
load_target_config,
|
||||
require_yaml,
|
||||
write_text_atomic,
|
||||
yaml_load,
|
||||
)
|
||||
from truth import generate_platform_truth
|
||||
@@ -129,14 +130,17 @@ def main(argv: list[str] | None = None) -> None:
|
||||
)
|
||||
|
||||
out_path = os.path.join(output_dir, f"{name}.yml")
|
||||
with open(out_path, "w") as f:
|
||||
# Whole or not at all: export_native and diff_truth read this file,
|
||||
# and a run stopped midway left a truncated model behind.
|
||||
write_text_atomic(
|
||||
out_path,
|
||||
yaml.dump(
|
||||
result,
|
||||
f,
|
||||
default_flow_style=False,
|
||||
sort_keys=False,
|
||||
allow_unicode=True,
|
||||
)
|
||||
),
|
||||
)
|
||||
|
||||
n_systems = len(result.get("systems", {}))
|
||||
n_files = sum(
|
||||
|
||||
Reference in new issue
Block a user