JOURNAL.SH(1)

🌸 JOURNAL.SH(1) β€” the journalling manual, bestie edition 🌸

okay so this is JOURNAL.SH(1) from the User Contributed Perl Documentation section, and it's literally the BeakerLib journalling page. i'm gonna walk you through it like we're on facetime, no cap πŸ’…


✨ NAME ✨

BeakerLib - journal - journalling functionality πŸŽ€

like, the whole vibe of this page is journaling. yes bestie, your test suite is getting a diary. πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

Routines for initializing the journalling features and pretty printing journal contents. that's it, that's the description β€” it's giving "short and iconic." ✨


🧚 FUNCTIONS 🧚

πŸ“ Journalling

rlJournalStart

Initialize the journal file. πŸŽ€

rlJournalStart

Run this on the very beginning of your script to initialize journalling functionality. like, top of the file, first thing, do not pass go. πŸ‘‘

rlJournalEnd

Summarize the test run and upload the journal file. πŸ’–

rlJournalEnd

Run this on the very end of your script to print summary of the whole test run, generate OUTPUTFILE and include journal in Beaker logs. so yeah β€” it's the closing credits of your test, and it also does the uploading and the OUTPUTFILE generation. multi-tasking queen. πŸ‘Έ

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. so pretty is the default because obviously we want the glow-up ✨

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 &lt;psplicha@redhat.com&gt;

    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 β€” The option is now deprecated, has no effect and will be removed in a future version. 🫢 so like... it's a ghost. it does nothing. it will be gone soon. don't get attached.
lowkey important: --full-journal genuinely has no effect β€” it's deprecated and slated for removal in a future version. it's not a secret cheat code, it's just a leftover.

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@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 so far, or 255 if there are more than 255 failures. The variable ECODE is set to the precise number. 😭 (so like, the return value caps out at 255, but ECODE keeps the real, exact count β€” iykyk)

rlGetTestState

rlGetPhaseState

Returns number of failed asserts in the current phase so far, or 255 if there are more than 255 failures. The variable ECODE is set to the precise number. same deal as above but scoped to the current phase πŸ¦‹

rlGetPhaseState

πŸ‘‘ AUTHORS πŸ‘‘

the icons who made this happen, periodt:

  • Petr Muller <pmuller@redhat.com>
  • Jan Hutar <jhutar@redhat.com>
  • Ales Zelinka <azelinka@redhat.com>
  • Petr Splichal <psplicha@redhat.com>
  • Dalibor Pospisil <dapospis@redhat.com>
  • Jakub Heger <jheger@redhat.com>

and that's the whole page bestie, you ate that πŸ’…βœ¨

signing off with the deets: this was perl v5.32.1, dated 2026-04-07 β€” JOURNAL.SH(1), main character energy, no cap. πŸŽ€πŸ’–

πŸ“¦ where this page comes from