Bug 481127 - [RFE] provide rlBundleLogsIfPhaseFails
[RFE] provide rlBundleLogsIfPhaseFails
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: beakerlib (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Petr Muller
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-22 04:45 EST by Jan Hutař
Modified: 2016-09-19 22:05 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-06 12:09:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Hutař 2009-01-22 04:45:41 EST
Description of problem:
function like rlBundleLogsIfPhaseFails would be great for me:

  rlPhaseStartSetup "Preparing things"
  rlBundleLogsIfPhaseFails /var/log/rhn/*.log
  rlRun "<install RHN Satellite>"
  rlPhaseEnd

Things to consider:

  * once we will include real *abort* functionality in the Setup phases,
    this should still work (we have to possibilities: abort when failed
    assert is detected, or abort when ending phase which contains failed
    asserts)
  * in case of the failure, logs should be colected at the *end* of the phase
    (or when we are leaving it - see previous point)


Additional info:
What do you think about this? We do not have any way how to determine if some assert before failed right?
Comment 1 Ales Zelinka 2009-01-22 05:04:02 EST
Why not just put rlBundleLogs /var/log/rhn/*.log right before rlPhaseEnd?

My guess is those logs are huge and you want to save rhts's disk space by not sending them when things work? 

ad> We do not have any way how to determine if some
assert before failed right?

true (afaik). I briefly checked the code and it seems all asserts return non-0 when they fail, so there is at least the possibility to store current state (although very clumsy).

Something like "rlSoFarSoGood" seems useful but I've not yet needed it in any of my tests.
Comment 2 Jan Hutař 2009-01-22 08:37:54 EST
Exactly, rlSoFarSoGood works for me as well.
Comment 3 Petr Šplíchal 2009-01-22 10:56:04 EST
What about implementing an optional parameter for rlPhaseEnd?

rlPhaseStartSetup "Preparing things"
    rlRun "<install RHN Satellite>"
rlPhaseEnd [command-on-failure] [command-on-success]
Comment 4 Jan Hutař 2009-01-23 08:03:53 EST
That could be enough, but what about we will decide later that failing assert in an abort phase causes immediate abort?
Comment 5 Petr Muller 2009-03-03 14:18:45 EST
Aborting should occur at rlPhaseEnd, if we ever implement it, so that shouldn't be a problem :)
Comment 7 Petr Muller 2013-03-06 12:09:19 EST
There's rl{Phase,Test}State which allows conditionals on the state of the test execution. Closing this.

Note You need to log in before you can comment on or make changes to this bug.