1Test::Smoke::Smoker(3)User Contributed Perl DocumentationTest::Smoke::Smoker(3)
2
3
4
6 Test::Smoke::Smoker - OO interface to do one smoke cycle.
7
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
22 The Test::Smoke::Smoker module, an OO interface to do one smoke cycle.
23
25 BUILD_MINIPERL
26 BUILD_NOTHING
27 BUILD_PERL
28 HARNESS3_RE_EXTRA
29 HARNESS3_RE_FAILED
30 HARNESS3_RE_TODO
31 HARNESS_RE1
32 HARNESS_RE2
33
35 Test::Smoke::Smoker->new( \*GLOB, %args )
36 new() takes a mandatory (opened) filehandle and some other options:
37
38 ddir build directory
39 fdir The forest source
40 v verbose level: 0..2
41 defaultenv 'make test' without $ENV{PERLIO}
42 is56x skip the PerlIO stuff?
43 locale do another testrun with $ENV{LC_ALL}
44 force_c_locale set $ENV{LC_ALL} = 'C' for all smoke runs
45
46 is_win32 is this MSWin32?
47 w32cc the CCTYPE for MSWin32 (MSVCxx BORLAND GCC)
48 w32make the maker to use for CCTYPE
49
50 $smoker->verbose
51 Get verbosity.
52
53 $smoker->mark_in()
54 Write the current timestamp with 'Start' marker to the logfile.
55
56 $smoker->mark_out()
57 Write the current timestamp with 'Stopped' marker to the logfile.
58
59 Test::Smoke::Smoker->config( $key[, $value] )
60 config() is an interface to the package lexical %CONFIG, which holds
61 all the default values for the new() arguments.
62
63 With the special key all_defaults this returns a reference to a hash
64 holding all the default values.
65
66 $smoker->tty( $message )
67 Prints a message to the default filehandle.
68
69 $smoker->log( $message )
70 Prints a message to the logfile, filehandle.
71
72 $smoker->ttylog( $message )
73 Prints a message to both the default and the logfile filehandles.
74
75 $smoker->smoke( $config[, $policy] )
76 smoke() takes a Test::Smoke::BuildCFG::Config object and runs all the
77 basic steps as (private) object methods.
78
79 $smoker->make_distclean( )
80 make_distclean() runs "make -i distclean 2>/dev/null"
81
82 $smoker->extra_manicheck( )
83 extra_manicheck() will only work for "$self->{v} > 1" and does an extra
84 integrity check comparing MANIFEST and the source-tree. Output is send
85 to the tty.
86
87 $smoker->handle_policy( $policy, @substs );
88 handle_policy() will try to apply the substition rules and then write
89 the file Policy.sh.
90
91 $smoker->Configure( $config )
92 Configure() sorts out the MSWin32 mess and calls ./Configure
93
94 returns true if a makefile was created
95
96 $smoker->make_( )
97 make_() will run make.
98
99 returns true if a perl executable is found
100
101 make_test_prep( )
102 Run "make test-prep" and check if t/perl exists.
103
104 $smoker->make_test( )
105 $self->extend_with_harness( @nok )
106 $smoker->make_test_harness
107 Use Test::Harness (the test_harness target) to get the failing test
108 information and do not bother with TEST.
109
110 $smoker->_run_harness_target( $target, $extra )
111 The command to run "make test_harness" differs based on platform, so
112 the arguments have to be passed into general routine. $target specifies
113 the makefile-target, $makeopt specifies the extra options for the make
114 program.
115
116 $smoker->_run_harness3_target( $target, $extra )
117 The command to run "make test_harness" differs based on platform, so
118 the arguments have to be passed into general routine. $target specifies
119 the makefile-target, $makeopt specifies the extra options for the make
120 program.
121
122 $self->make_minitest
123 "make" was unable to build a perl executable, but managed to build
124 miniperl, so we do "make minitest".
125
126 $self->_parse_harness_output( $\%notok, $all_ok, @lines )
127 Factor out the parsing of the Test::Harness output, as it seems subject
128 to change.
129
130 $self->_parse_harness3_output( $\%notok, $all_ok, @lines )
131 Fator out the parsing of the Test::Harness 3 output, as it seems
132 subject to change.
133
134 $self->_transform_testnames( @notok )
135 _transform_testnames() takes a list of testnames, as found by "TEST"
136 (testname without ".t" suffix followed by dots and a reason) and
137 returns a hash with the filenames relative to the "t/" directory as
138 keys and the reason as value.
139
140 $smoker->_normalize_testname( $test )
141 Normalize a testname...
142
143 set_skip_tests( [$unset] )
144 Read from a MANIFEST like file, set in "$self->{skip_tests}", and
145 rename the files in it with the extension .tskip. If $unset is set,
146 they will be renamed back.
147
148 unset_skip_tests
149 Calls "$self->set_skip_tests( 1 )".
150
151 $self->change_manifest( \@tests, $unset )
152 $self->_run( $command[, $sub[, @args]] )
153 _run() returns qx( $command ) unless $sub is specified. If $sub is
154 defined (and a coderef) "$sub->( $command, @args )" will be called.
155
156 $self->_make( $command )
157 _make() calls "run( "make $command" )", and does some extra stuff to
158 help MSWin32 (the right maker, the directory).
159
160 $smoker->_make_fork( $target, $extra )
161 _make_fork() opens a read pipe to the make command with $target and
162 $extra arguments for the make command.
163
164 $smoker->_vms__rooted_logical
165 This code sets up a rooted logical "TSP5SRC" and changes the {ddir} to
166 that root.
167
169 Test::Smoke
170
172 (c) 2002-2003, All rights reserved.
173
174 * Abe Timmerman <abeltje@cpan.org>
175
176 This library is free software; you can redistribute it and/or modify it
177 under the same terms as Perl itself.
178
179 See:
180
181 • <http://www.perl.com/perl/misc/Artistic.html>
182
183 • <http://www.gnu.org/copyleft/gpl.html>
184
185 This program is distributed in the hope that it will be useful, but
186 WITHOUT ANY WARRANTY; without even the implied warranty of
187 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
188
189
190
191perl v5.36.0 2023-01-20 Test::Smoke::Smoker(3)