Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
1 result

Target

Select target project
  • jirikalvoda/task-autotest
1 result
Select Git revision
  • master
1 result
Show changes

Commits on Source 2

......@@ -25,7 +25,7 @@ def test_random(task_commits: dict[str, str]):
shuffle(task_commits)
for task, commit_hash in task_commits:
if not os.path.exists(os.path.join(config.DATA_DIR, path_to_str(task), commit_hash)):
if not os.path.exists(os.path.join(config.DATA_DIR, "tests", path_to_str(task), commit_hash)):
return test_task_commit(task, commit_hash)
return None
......
......@@ -20,17 +20,21 @@ def test_task_commit(task_path: str, commit_hash: str, workdir="_test") -> None:
with open(outdir + "time", "w") as f:
f.write(str(int(start_time)))
task_path = os.path.join(config.REPO_DIR, workdir, task_path)
def run_pisek(args, output):
print("Run pisek")
with open(os.path.join(outdir, output), "w") as out:
return subprocess.run(
res = subprocess.run(
["pisek"] + args,
stdout=out,
stderr=subprocess.STDOUT,
text=True,
cwd=os.path.join(config.REPO_DIR, workdir, task_path),
cwd=task_path
)
print("Finished running pisek")
return res
lock = os.path.join(outdir, ".pisek_lock")
lock = os.path.join(task_path, ".pisek_lock")
if os.path.exists(lock):
os.unlink(lock)
......