Skip to content

Commit

Permalink
Hint beakerlib is old when result parsing fails
Browse files Browse the repository at this point in the history
Current error message was amiguous and it took time to realise the
problem lies in outdated beakerlib version
  • Loading branch information
lukaszachy committed May 11, 2023
1 parent a4e8d47 commit c20e08e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tmt/steps/execute/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,15 @@ def check_beakerlib(self, test: "tmt.Test", guest: Guest) -> List["tmt.Result"]:
search_state = re.search(r'TESTRESULT_STATE="?(\w+)"?', results)

if search_result is None or search_state is None:
# Same outcome but make it easier to debug
if search_result is None:
missing_piece = 'TESTRESULT_RESULT_STRING='
hint = ''
else:
missing_piece = 'TESTRESULT_STATE='
hint = ', possibly outdated beakerlib (requires 1.23+)'
self.debug(
f"No result or state found in '{beakerlib_results_file}'.",
f"No '{missing_piece}' found in '{beakerlib_results_file}'{hint}.",
level=3)
note = 'beakerlib: Result/State missing'
return [tmt.Result.from_test(
Expand Down

0 comments on commit c20e08e

Please sign in to comment.