Test::AutoBuild::StageUsereContributed PerlTest::AutoBuild::Stage::Iterator(3)NAMETest::AutoBuild::Stage::Iterator - Run a set of stages for each module
SYNOPSIS
use Test::AutoBuild::Stage::IteratorDESCRIPTION
This stage iterates over the (ordered) list of modules, running a set
of sub-stages against each one. The current module being passed into
the "run" method of each stage. If the sub-stages are iterator-aware
this enables a configuration to be setup to generate incremental HTML
status pages during the course of the build cycle.
CONFIGURATION
In addition to the standard parameters defined by the
Test::AutoBuild::Stage module, this module also handles the optional
"stages" parameter to specify a list of sub-stages. Sub-stages are
listed in the same format as top level stages, ie an array of hashes.
EXAMPLE
{
name = build
label = Build iterator
module = Test::AutoBuild::Stage::Iterator
# Don't abort entire cycle if the module build fails
critical = 0
stages = (
# Basic build
{
name = build
label = Build
module = Test::AutoBuild::Stage::Build
options = {
...snip build options...
}
}
# Status pages
{
name = html
label = HTML status pages
module = Test::AutoBuild::Stage::HTMLStatus
options = {
...snip status options...
}
}
)
}
METHODS
$stage->init(%params);
Overrides the super-class to add in handling of the optional
"stages" parameter for defining sub-stages. It is not neccessary to
call this method, since it is called by the "new" method
automatically.
my @stages = $stage->stages();
Retrieves the list of sub-stages that belong to this group. The
elements in the array are instances of Test::AutoBuild::Stage
module.
$stage->process($runtime);
Iterates over all modules (in depenedancy sorted order), for each
module, running the set of configured sub-stages. The sub-stages
will have the name of the current module passed in as the second
parameter to the "run" method. If any sub-stages fails & that stage
is marked as critical, this stage will be marked as failing and
return control immediately. If the sub-stage is non-critical, then
the iterator will continue processing.
AUTHORS
Daniel Berrange <dan@berrange.com> Dennis Gregorovic
<dgregorovic@alum.mit.edu>
COPYRIGHT
Copyright (C) 2004 Red Hat, Inc.
SEE ALSOperl(1), Test::AutoBuild::Stage
perl v5.14.12011-09-0Test::AutoBuild::Stage::Iterator(3)