Skip to content

Commit

Permalink
Do not reapply the log path fix in _process_results_paritals method
Browse files Browse the repository at this point in the history
  • Loading branch information
seberm committed Nov 22, 2024
1 parent 4167a1e commit 34cf40c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tmt/steps/execute/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -791,8 +791,8 @@ def _load_tmt_report_results_file(self, invocation: TestInvocation) -> ResultCol
collection.file_exists = True
collection.results = tmt.utils.yaml_to_list(results_path.read_text())

# Fix log paths created by `tmt-report-result` on the guest the same way as it's done for
# partial results
# Fix log paths created by `tmt-report-result` on the guest, which are by default relative
# to the `TMT_TEST_DATA`, to be relative to the `execute` directory.
for result in collection.results:
result["log"] = [str(invocation.relative_test_data_path / log)
for log in result.get("log", [])]
Expand Down Expand Up @@ -837,11 +837,6 @@ def _process_results_partials(
partial_result.name = '/' + partial_result.name
partial_result.name = test.name + partial_result.name

# Fix log paths as user provides relative path to TMT_TEST_DATA
# but Result has to point relative to the execute workdir
partial_result.log = [
invocation.relative_test_data_path / log for log in partial_result.log]

# Include the default output log if no log provided
if not partial_result.log and default_log is not None:
partial_result.log.append(default_log)
Expand Down

0 comments on commit 34cf40c

Please sign in to comment.