Run each side's tests in a committed copy, so task-bench tests that call git pass #795

Merged
lilleman merged 6 commits from item-571 into main 2026-12-03 13:34:00 +01:00
Showing only changes of commit 459705c88a - Show all commits
+1 -4
View File
@@ -110,11 +110,8 @@ def tests_in_copy(containers: Containers, tree: str, folder: pathlib.Path, git:
copied = on_disk(f"copy {tree} to test it", lambda: shutil.copytree(tree, copy, symlinks=True))
if isinstance(copied, Failure):
return copied
if failure := committed(git, str(copy)):
shutil.rmtree(copy, ignore_errors=True)
return failure
try:
return ran_tests(containers, str(copy))
return committed(git, str(copy)) or ran_tests(containers, str(copy))
finally:
shutil.rmtree(copy, ignore_errors=True)