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 Test::Auto‐
20 Build::Stage module, this module also handles the optional "stages"
21 parameter to specify a list of sub-stages. Sub-stages are listed in the
22 same format as top level stages, ie an array of hashes.
23
24 EXAMPLE
25
26 {
27 name = build
28 label = Build iterator
29 module = Test::AutoBuild::Stage::Iterator
30 # Don't abort entire cycle if the module build fails
31 critical = 0
32 stages = (
33 # Basic build
34 {
35 name = build
36 label = Build
37 module = Test::AutoBuild::Stage::Build
38 options = {
39 ...snip build options...
40 }
41 }
42 # Status pages
43 {
44 name = html
45 label = HTML status pages
46 module = Test::AutoBuild::Stage::HTMLStatus
47 options = {
48 ...snip status options...
49 }
50 }
51 )
52 }
53
55 $stage->init(%params);
56 Overrides the super-class to add in handling of the optional
57 "stages" parameter for defining sub-stages. It is not neccessary to
58 call this method, since it is called by the "new" method automati‐
59 cally.
60
61 my @stages = $stage->stages();
62 Retrieves the list of sub-stages that belong to this group. The
63 elements in the array are instances of Test::AutoBuild::Stage mod‐
64 ule.
65
66 $stage->process($runtime);
67 Iterates over all modules (in depenedancy sorted order), for each
68 module, running the set of configured sub-stages. The sub-stages
69 will have the name of the current module passed in as the second
70 parameter to the "run" method. If any sub-stages fails & that stage
71 is marked as critical, this stage will be marked as failing and
72 return control immediately. If the sub-stage is non-critical, then
73 the iterator will continue processing.
74
76 Daniel Berrange <dan@berrange.com> Dennis Gregorovic <dgre‐
77 gorovic@alum.mit.edu>
78
80 Copyright (C) 2004 Red Hat, Inc.
81
83 perl(1), Test::AutoBuild::Stage
84
85
86
87perl v5.8.8 2007-12-09Test::AutoBuild::Stage::Iterator(3)