1Test::AutoBuild::Stage:U:sIetrerCaotnotrr(i3b)uted PerlTDeosctu:m:eAnuttaotBiuoinld::Stage::Iterator(3)
2
3
4
6 Test::AutoBuild::Stage::Iterator - Run a set of stages for each module
7
9 use Test::AutoBuild::Stage::Iterator
10
12 This stage iterates over the (ordered) list of modules, running a set
13 of sub-stages against each one. The current module being passed into
14 the "run" method of each stage. If the sub-stages are iterator-aware
15 this enables a configuration to be setup to generate incremental HTML
16 status pages during the course of the build cycle.
17
19 In addition to the standard parameters defined by the
20 Test::AutoBuild::Stage module, this module also handles the optional
21 "stages" parameter to specify a list of sub-stages. Sub-stages are
22 listed in the same format as top level stages, ie an array of hashes.
23
24 EXAMPLE
25 {
26 name = build
27 label = Build iterator
28 module = Test::AutoBuild::Stage::Iterator
29 # Don't abort entire cycle if the module build fails
30 critical = 0
31 stages = (
32 # Basic build
33 {
34 name = build
35 label = Build
36 module = Test::AutoBuild::Stage::Build
37 options = {
38 ...snip build options...
39 }
40 }
41 # Status pages
42 {
43 name = html
44 label = HTML status pages
45 module = Test::AutoBuild::Stage::HTMLStatus
46 options = {
47 ...snip status options...
48 }
49 }
50 )
51 }
52
54 $stage->init(%params);
55 Overrides the super-class to add in handling of the optional
56 "stages" parameter for defining sub-stages. It is not neccessary to
57 call this method, since it is called by the "new" method
58 automatically.
59
60 my @stages = $stage->stages();
61 Retrieves the list of sub-stages that belong to this group. The
62 elements in the array are instances of Test::AutoBuild::Stage
63 module.
64
65 $stage->process($runtime);
66 Iterates over all modules (in depenedancy sorted order), for each
67 module, running the set of configured sub-stages. The sub-stages
68 will have the name of the current module passed in as the second
69 parameter to the "run" method. If any sub-stages fails & that stage
70 is marked as critical, this stage will be marked as failing and
71 return control immediately. If the sub-stage is non-critical, then
72 the iterator will continue processing.
73
75 Daniel Berrange <dan@berrange.com> Dennis Gregorovic
76 <dgregorovic@alum.mit.edu>
77
79 Copyright (C) 2004 Red Hat, Inc.
80
82 perl(1), Test::AutoBuild::Stage
83
84
85
86perl v5.12.1 2007-12-08Test::AutoBuild::Stage::Iterator(3)