Description of problem:
In file plugins/task_run.d/15_beakerlib there's:
In beakerlib project in file /usr/share/beakerlib/testing.sh there's:
local result="$(echo "$2" | tr '[:lower:]' '[:upper:]')"
# report the result only if TESTID is set
if [ -n "$TESTID" ] ; then
$BEAKERLIB_COMMAND_REPORT_RESULT "$testname" "$result" "$logfile" "$score" \
|| rlLogError "rlReport: Failed to report the result"
But rstrnt-report-result accepts different arguments:
rstrnt-report-result [OPTION...] TASK_PATH RESULT SCORE
rhts-report-result from restraint-rhts solves this, but even if it's installed, it's not used by default.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. run test using beakerlib via restraint client
2. check index.html in the result directory
Instead of score, there's path to file, desired custom logfile is never uploaded.
Correct score is shown, custom logfile is uploaded.
The problem is, that beakerlib does:
rstrnt-report-result "$testname" "$result" "$logfile" "$score"
but restraint expects:
rstrnt-report-result TASK_PATH RESULT SCORE
The workaround is to put following line to the test itself:
Sorry about not mentioning that the workaround requires to have restraint-rhts installed.
This is actually preventing the beaker dogfood test suite from being run using restraint, but fixing it is a little more involved than I initially thought.
I've modified rstrnt-report-result to have two argument parsing frontends. One is the rstrnt-report-result style, the other is compatible with the old rhts-report-result style.
In the restraint RPM package there will be:
Under the hood they are the same binary. It will detect the filename it was invoked as and process arguments accordingly.
The beakerlib plugin will call rhts-report-result as that is the argument format it is expecting.
After running a job through restraint's client using beakerlib, this bug seems to be fixed. The 'index.html' has both a score number and custom log files.