-
Notifications
You must be signed in to change notification settings - Fork 144
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
Add subresults support for reportportal report plugin #3331
base: main
Are you sure you want to change the base?
Changes from all commits
363b1f3
9e6054e
3f657c8
22f166f
d761603
25ca286
d8c2984
ed549a2
c9b836e
8dae40d
229f12c
087f29f
85445f0
3678814
89e394d
a23a479
f99a2f1
1cb3259
ecd3ba0
346b62e
62690b9
a6cfa56
61fde05
f89135c
6d0c1bf
aef6a3c
984a4f9
641c073
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
. /usr/share/beakerlib/beakerlib.sh || exit 1 | ||
|
||
|
||
rlJournalStart | ||
rlPhaseStartSetup "phase-setup" | ||
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" | ||
rlRun "pushd $tmp" | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "phase-test pass" | ||
rlRun -s "echo mytest-pass" 0 "Check output" | ||
rlAssertGrep "mytest-pass" "$rlRun_LOG" | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "phase-test fail" | ||
rlRun -s "echo mytest-fail" 0 "Check output" | ||
rlAssertGrep "this-will-intentionally-fail" "$rlRun_LOG" | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest "phase-test multiple tmt-report-result" | ||
rlRun "echo bkr_good_log > bkr_good.log" | ||
rlRun "echo bkr_bad_log > bkr_bad.log" | ||
rlRun "echo bkr_weird_log > bkr_weird.log" | ||
rlRun "echo bkr_skip_log > bkr_skip.log" | ||
rlRun "echo bkr_good_rhts_log > bkr_good_rhts.log" | ||
|
||
# This will create more subresults for each | ||
# tmt-report-result/rhts-report-result call | ||
rlRun "tmt-report-result -o bkr_good.log extra-tmt-report-result/good PASS" | ||
rlRun "tmt-report-result -o bkr_bad.log extra-tmt-report-result/bad FAIL" | ||
rlRun "tmt-report-result -o bkr_weird.log extra-tmt-report-result/weird WARN" | ||
rlRun "tmt-report-result -o bkr_skip.log extra-tmt-report-result/skip SKIP" | ||
rlRun "rhts-report-result extra-rhts-report-result/good PASS bkr_good_rhts.log" | ||
rlPhaseEnd | ||
|
||
rlPhaseStartCleanup "phase-cleanup" | ||
rlRun "popd" | ||
rlRun "rm -r $tmp" 0 "Remove tmp directory" | ||
rlPhaseEnd | ||
rlJournalEnd |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,23 @@ | |
/weird: | ||
summary: An error encountered | ||
test: this-is-a-weird-command | ||
|
||
/subresults: | ||
summary: Test the tmt subresults (ReportPortal child items) | ||
test: | | ||
tmt-report-result /subtest/good PASS | ||
tmt-report-result /subtest/fail FAIL | ||
tmt-report-result /subtest/weird WARN | ||
|
||
/subresults-restraint: | ||
result: restraint | ||
test: | | ||
tmt-report-result /subtest-restraint/good PASS | ||
tmt-report-result /subtest-restraint/fail FAIL | ||
tmt-report-result /subtest-restraint/weird WARN | ||
|
||
# TODO: Enable test of subresults for beakerlib phases | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @seberm a TODO item? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, first, I need to stabilize the existing tests, and then I plan to uncomment the beakerlib tests. We're still working on it with @4N0body5. |
||
#/subresults-beakerlib: | ||
# summary: Test the Beakerlib phases are propagated as tmt subresults | ||
# framework: beakerlib | ||
# test: ./beaker-phases-subresults.sh |
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reportportal tests are not designed to run in the GH CI. Instead, they should be executed locally by a developer against a specific ReportPortal instance. That's why I think it's preferable to run them in a container or using the '-h virtual' option. I am not "--feeling-safe" enough to run them locally :).