1Test::Smoke::Smoker(3)User Contributed Perl DocumentationTest::Smoke::Smoker(3)
2
3
4

NAME

6       Test::Smoke::Smoker - OO interface to do one smoke cycle.
7

SYNOPSIS

9           use Test::Smoke;
10           use Test::Smoke::Smoker;
11
12           open LOGFILE, "> mktest.out" or die "Cannot create 'mktest.out': $!";
13           my $buildcfg = Test::SmokeBuildCFG->new( $conf->{cfg} );
14           my $policy = Test::Smoke::Policy->new( '../', $conf->{v} );
15           my $smoker = Test::Smoke::Smoker->new( \*LOGFILE, $conf );
16
17           foreach my $config ( $buildcfg->configurations ) {
18               $smoker->smoke( $config, $policy );
19           }
20

DESCRIPTION

METHODS

23       Test::Smoke::Smoker->new( \*GLOB, %args )
24           "new()" takes a mandatory (opened) filehandle and some other
25           options:
26
27               ddir            build directory
28               fdir            The forest source
29               v               verbose level: 0..2
30               defaultenv      'make test' without $ENV{PERLIO}
31               is56x           skip the PerlIO stuff?
32               locale          do another testrun with $ENV{LC_ALL}
33               force_c_locale  set $ENV{LC_ALL} = 'C' for all smoke runs
34
35               is_win32        is this MSWin32?
36               w32cc           the CCTYPE for MSWin32 (MSVCxx BORLAND GCC)
37               w32make         the maker to use for CCTYPE
38
39       Test::Smoke::Smoker->config( $key[, $value] )
40           "config()" is an interface to the package lexical %CONFIG, which
41           holds all the default values for the "new()" arguments.
42
43           With the special key all_defaults this returns a reference to a
44           hash holding all the default values.
45
46       $smoker->tty( $message )
47           Prints a message to the default filehandle.
48
49       $smoker->log( $message )
50           Prints a message to the logfile, filehandle.
51
52       $smoker->ttylog( $message )
53           Prints a message to both the default and the logfile filehandles.
54
55       $smoker->smoke( $config[, $policy] )
56           "smoke()" takes a Test::Smoke::BuildCFG::Config object and runs all
57           the basic steps as (private) object methods.
58
59       $smoker->make_distclean( )
60           "make_distclean()" runs "make -i distclean 2>/dev/null"
61
62       $smoker->extra_manicheck( )
63           "extra_manicheck()" will only work for "$self->{v} > 1" and does an
64           extra integrity check comparing MANIFEST and the source-tree.
65           Output is send to the tty.
66
67       $smoker->handle_policy( $policy, @substs );
68           "handle_policy()" will try to apply the substition rules and then
69           write the file Policy.sh.
70
71       $smoker->Configure( $config )
72           "Configure()" sorts out the MSWin32 mess and calls ./Configure
73
74           returns true if a makefile was created
75
76       $smoker->make_( )
77           "make_()" will run make.
78
79           returns true if a perl executable is found
80
81       make_test_prep( )
82           Run "make test-perp" and check if t/perl exists.
83
84       $smoker->make_test( )
85       $self->extend_with_harness( @nok )
86       $moker->make_test_harness
87           Use Test::Harness (the test_harness target) to get the failing test
88           information and do not bother with TEST.
89
90       $smoker->_run_harness_target( $target, $extra )
91           The command to run "make test_harness" differs based on platform,
92           so the arguments have to be passed into general routine. $target
93           specifies the makefile-target, $makeopt specifies the extra options
94           for the make program.
95
96       $smoker->_run_harness3_target( $target, $extra )
97           The command to run "make test_harness" differs based on platform,
98           so the arguments have to be passed into general routine. $target
99           specifies the makefile-target, $makeopt specifies the extra options
100           for the make program.
101
102       $self->make_minitest
103           "make" was unable to build a perl executable, but managed to build
104           miniperl, so we do "make minitest".
105
106       $self->_parse_harness_output( $\%notok, $all_ok, @lines )
107           Fator out the parsing of the Test::Harness output, as it seems
108           subject to change.
109
110       $self->_parse_harness3_output( $\%notok, $all_ok, @lines )
111           Fator out the parsing of the Test::Harness 3 output, as it seems
112           subject to change.
113
114       $self->_trasnaform_testnames( @notok )
115           "_transform_testnames()" takes a list of testnames, as found by
116           "TEST" (testname without ".t" suffix followed by dots and a reason)
117           and returns a hash with the filenames relative to the "t/"
118           directory as keys and the reason as value.
119
120       $smoker->_normalize_testname( $test )
121           Normalize a testname...
122
123       set_skip_tests( [$unset] )
124           Read from a MANIFEST like file, set in "$self->{skip_tests}", and
125           rename the files in it with the extension .tskip. If $unset is set,
126           they will be renamed back.
127
128       unset_skip_tests
129           Calls "$self->set_skip_tests( 1 )".
130
131       $self->change_manifest( \@tests, $unset )
132       $self->_run( $command[, $sub[, @args]] )
133           "_run()" returns "qx( $command )" unless $sub is specified.  If
134           $sub is defined (and a coderef) "$sub->( $command, @args )" will be
135           called.
136
137       $self->_make( $command )
138           "_make()" calls "run( "make $command" )", and does some extra stuff
139           to help MSWin32 (the right maker, the directory).
140
141       $smoker->_make_fork( $target, $extra )
142           "_make_fork()" opens a read pipe to the make command with $target
143           and $extra arguments for the make command.
144
145       $smoker->_vms__rooted_logical
146           This code sets up a rooted logical "TSP5SRC" and changes the {ddir}
147           to that root.
148

SEE ALSO

150       Test::Smoke
151
153       (c) 2002-2003, All rights reserved.
154
155         * Abe Timmerman <abeltje@cpan.org>
156
157       This library is free software; you can redistribute it and/or modify it
158       under the same terms as Perl itself.
159
160       See:
161
162       ·   http://www.perl.com/perl/misc/Artistic.html
163
164       ·   http://www.gnu.org/copyleft/gpl.html
165
166       This program is distributed in the hope that it will be useful, but
167       WITHOUT ANY WARRANTY; without even the implied warranty of
168       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
169
170
171
172perl v5.12.1                      2010-01-20            Test::Smoke::Smoker(3)
Impressum