Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log tool output #371

Merged
merged 1 commit into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/python/replay_merge.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Replay merges and their test results.
The output appears in the .workdirs/ directory.
The output appears in the `.workdirs`/ directory.
Logs appear in the `replay_logs/merges/` directory.
Command-line arguments are listed just after the line:
if __name__ == "__main__":

Expand Down
9 changes: 7 additions & 2 deletions src/python/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,13 +558,18 @@ def merge(
str(timeout),
f"src/scripts/merge_tools/{tool.name}.sh {self.local_repo_path.resolve()} {LEFT_BRANCH_NAME} {RIGHT_BRANCH_NAME}",
]
logger.debug(
f"merge: Merging {self.repo_slug} {left_commit} {right_commit} with {tool.name}"
)
p = subprocess.run(
command,
capture_output=True,
check=False,
)
std_streams = stdout_and_stderr(command, p)
logger.debug(std_streams)
if p.returncode == 124: # Timeout
explanation = explanation + "\n" + stdout_and_stderr(command, p)
explanation = explanation + "\n" + std_streams
if use_cache:
cache_entry["merge status"] = MERGE_STATE.Merge_timedout.name
cache_entry["explanation"] = explanation
Expand All @@ -583,7 +588,7 @@ def merge(
-1,
)
run_time = time.time() - start_time
explanation = explanation + "\n" + stdout_and_stderr(command, p)
explanation = explanation + "\n" + std_streams
merge_status = (
MERGE_STATE.Merge_success if p.returncode == 0 else MERGE_STATE.Merge_failed
)
Expand Down