[PATCH 0/6] Journaling cleanups, custom TMP dir

Petr Muller pmuller at redhat.com
Tue Oct 2 19:43:46 UTC 2012


On Mon, 2012-09-17 at 17:32 +0200, Jiri Jaburek wrote:
> This is a series of cleanups/rewrites of the journaling subsystem,
> ultimately leading to custom BEAKERLIB_DIR specification (its usage
> from the external environment), taking several side benefits along
> the way.
> 
> Historically, "journalling.py" had --id option for Beaker test ID
> specification, but was not really environment-independent (PKGNVR,
> BEAKERLIB variables). Each invocation had to pass --id.
> 
> This made sense for beaker jobs, /tmp/beakerlib-$id/journal.xml
> (hardcoded) was used as temp dir.
> 
> During manual runs, however, a randomly generated and created (mktemp)
> directory /tmp/beakerlib-XXXXXXX was created and the XXXXXXX used
> as "run_id" (instead of Beaker-provided test run number).
> 
> There was whole lot of an infrastructure in journal.sh to support this
> kind of hack, like BEAKERLIB_RUN, which was then contained in
> BEAKERLIB_DIR's path. This would make custom specification of
> BEAKERLIB_DIR quite complex.
> 
> 
> This series therefore removes BEAKERLIB_RUN, makes "journalling.py"
> get the test run number from TESTID env variable directly, which
> eliminates the need for --id passing infrastructure inside
> journalling.py and also solves the hardcoded /tmp/beakerlib-%s/journal.xml
> in it, by using BEAKERLIB_JOURNAL directly.
> 
> That simplifies temporary directory management a lot, making custom
> BEAKERLIB_DIR specification possible, along with certain side advantages.
> 
> BEAKERLIB_RUN has been removed, BEAKERLIB_DIR management is done only
> by journal.sh, which exports BEAKERLIB_JOURNAL for "journalling.py".
> 
> 
> Furthermore, test_id is now present in final journal.xml only during
> Beaker runs (where TESTID is available). This might lead to a potential
> API change, assuming journal.xml is considered to be an API.
> 
> 
> Specifics for each commit/change are in respective commit messages,
> the series has been tested both in Beaker and during manual test runs,
> test coverage for custom BEAKERLIB_DIR specification has been made.

Hi Jiri,

first of all: thanks! I really like commits *removing* and simplifying
things. I've applied & pushed 5 of the 6 commits, the exception was
patch 5. Transfer of test ID from string to integer is IMHO not
necessary for anything, and I actually used string TESTID in non-beaker
context in the past.

PM



More information about the beakerlib-devel mailing list