beakerlib-journal (1) - Linux Manuals
beakerlib-journal: journal - journalling functionality
NAME
BeakerLib - journal - journalling functionality
DESCRIPTION
Routines for initializing the journalling features and pretty printing journal contents.FUNCTIONS
Journalling
rlJournalStartInitialize the journal file.
rlJournalStart
Run on the very beginning of your script to initialize journalling functionality.
rlJournalEnd
Summarize the test run and upload the journal file.
rlJournalEnd
Run on the very end of your script to print summary of the whole test run, generate OUTPUTFILE and include journal in Beaker logs.
rlJournalPrint
Print the content of the journal in pretty xml format.
rlJournalPrint [type]
- type
- Can be either 'raw' or 'pretty', with the latter as a default. Raw: xml is in raw form, no indentation etc Pretty: xml is pretty printed, indented, with one record per line
Example:
<?xml version="1.0"?> <BEAKER_TEST> <test_id>debugging</test_id> <package>setup</package> <pkgdetails>setup-2.8.9-1.fc12.noarch</pkgdetails> <starttime>2010-02-08 15:17:47</starttime> <endtime>2010-02-08 15:17:47</endtime> <testname>/examples/beakerlib/Sanity/simple</testname> <release>Fedora release 12 (Constantine)</release> <hostname>localhost</hostname> <arch>i686</arch> <purpose>PURPOSE of /examples/beakerlib/Sanity/simple Description: Minimal BeakerLib sanity test Author: Petr Splichal <psplicha [at] redhat.com> This is a minimal sanity test for BeakerLib. It contains a single phase with a couple of asserts. We Just check that the "setup" package is installed and that there is a sane /etc/passwd file. </purpose> <log> <phase endtime="2010-02-08 15:17:47" name="Test" result="PASS" score="0" starttime="2010-02-08 15:17:47" type="FAIL"> <test message="Checking for the presence of setup rpm">PASS</test> <test message="File /etc/passwd should exist">PASS</test> <test message="File '/etc/passwd' should contain 'root'">PASS</test> </phase> </log> </BEAKER_TEST>
rlJournalPrintText
Print the content of the journal in pretty text format.
rlJournalPrintText [--full-journal]
- --full-journal
- With this option, additional items like some HW information will be printed in the journal.
Example:
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: TEST PROTOCOL :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: Test run ID : debugging :: [ LOG ] :: Package : debugging :: [ LOG ] :: Test started : 2010-02-08 14:45:57 :: [ LOG ] :: Test finished : 2010-02-08 14:45:58 :: [ LOG ] :: Test name : :: [ LOG ] :: Distro: : Fedora release 12 (Constantine) :: [ LOG ] :: Hostname : localhost :: [ LOG ] :: Architecture : i686 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: Test description :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: PURPOSE of /examples/beakerlib/Sanity/simple Description: Minimal BeakerLib sanity test Author: Petr Splichal <psplicha [at] redhat.com> This is a minimal sanity test for BeakerLib. It contains a single phase with a couple of asserts. We Just check that the "setup" package is installed and that there is a sane /etc/passwd file. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ PASS ] :: Checking for the presence of setup rpm :: [ PASS ] :: File /etc/passwd should exist :: [ PASS ] :: File '/etc/passwd' should contain 'root' :: [ LOG ] :: Duration: 1s :: [ LOG ] :: Assertions: 3 good, 0 bad :: [ PASS ] :: RESULT: Test
rlGetTestState
Returns number of failed asserts in so far, 255 if there are more then 255 failures.
rlGetTestState
rlGetPhaseState
Returns number of failed asserts in current phase so far, 255 if there are more then 255 failures.
rlGetPhaseState
AUTHORS
- •
- Petr Muller <pmuller [at] redhat.com>
- •
- Jan Hutar <jhutar [at] redhat.com>
- •
- Ales Zelinka <azelinka [at] redhat.com>
- •
-
Petr Splichal <psplicha [at] redhat.com>