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

Use rhts-report-result alias instead of tmt-report-result for reporting beakerlib subresults #3372

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

seberm
Copy link
Collaborator

@seberm seberm commented Nov 20, 2024

I was troubleshooting why the logs for beakerlib phases (aka tmt subresults) are not saved by tmt-report-result script and the reason is the following.

The beakerlib calls the command in BEAKERLIB_COMMAND_REPORT_RESULT variable in the following way:

$BEAKERLIB_COMMAND_REPORT_RESULT "$testname" "$result" "$logfile" "$score"

See the implementation of rlReport here:

Suppose we use tmt-report-result as the value for BEAKERLIB_COMMAND_REPORT_RESULT (as a script name). In that case, the script will not be compatible with the third $logfile positional argument - it will just ignore it because it accepts the logfile provided only by the -o/--outputFile option by default.

We want to use the rhts-report-result alias because of a compatibility layer implemented by the tmt-report-result script itself. If the script gets called with rhts-report-result name, it will accept the third positional argument as a logfile:

Related to:

Pull Request Checklist

  • implement the feature
  • extend the test coverage

@seberm seberm added step | execute Stuff related to the execute step area | results Related to how tmt stores and shares results ci | full test Pull request is ready for the full test execution labels Nov 20, 2024
@seberm seberm added this to the 1.40 milestone Nov 20, 2024
@seberm seberm marked this pull request as ready for review November 20, 2024 15:13
tmt/frameworks/beakerlib.py Outdated Show resolved Hide resolved
@seberm seberm requested a review from happz November 20, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area | results Related to how tmt stores and shares results ci | full test Pull request is ready for the full test execution step | execute Stuff related to the execute step
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants