Test::S...::Smoker(3)
π Test::Smoke::Smoker β the manual, but make it cute π
okay so bestie, welcome to the Test::Smoke::Smoker(3) page, part of the User Contributed Perl Documentation situation. This is the module that's literally just here to do one smoke cycle with an OO interface. She's focused. She's efficient. She's giving main character energy and she only has one job. π
β¨ NAME β¨
Test::Smoke::Smoker β an OO interface to do one smoke cycle. That's it, that's the whole vibe. π
πΈ SYNOPSIS πΈ
Okay so here's how you actually use her:
use Test::Smoke;
use Test::Smoke::Smoker;
open LOGFILE, "> mktest.out" or die "Cannot create 'mktest.out': $!";
my $buildcfg = Test::SmokeBuildCFG->new( $conf->{cfg} );
my $policy = Test::Smoke::Policy->new( '../', $conf->{v} );
my $smoker = Test::Smoke::Smoker->new( \*LOGFILE, $conf );
foreach my $config ( $buildcfg->configurations ) {
$smoker->smoke( $config, $policy );
}
Not me opening a logfile and then looping over every configuration like a boss. The die on a failed open is non-negotiable, she does NOT do silent failures. π
π¦ DESCRIPTION π¦
The Test::Smoke::Smoker module β an OO interface to do one smoke cycle. Lowkey that's the whole description. She said what she said, periodt. π
β CONSTANTS β
These little icons live in the module and you don't get to change them:
BUILD_MINIPERLBUILD_NOTHINGBUILD_PERLHARNESS3_RE_EXTRAHARNESS3_RE_FAILEDHARNESS3_RE_TODOHARNESS_RE1HARNESS_RE2
π METHODS π
π« Test::Smoke::Smoker->new( \*GLOB, %args )
new() wants a mandatory (already opened!) filehandle, plus some other options. The filehandle is not optional bestie, she will not open it for you:
ddirβ build directoryfdirβ The forest sourcevβ verbose level:0..2defaultenvβ'make test'without$ENV{PERLIO}is56xβ skip the PerlIO stuff?localeβ do another testrun with$ENV{LC_ALL}force_c_localeβ set$ENV{LC_ALL} = 'C'for all smoke runsis_win32β is this MSWin32?w32ccβ the CCTYPE for MSWin32 (MSVCxx BORLAND GCC)w32makeβ the maker to use for CCTYPE
π« $smoker->verbose
Get verbosity. That's it. She tells you how chatty she's feeling. π£οΈ
π« $smoker->mark_in()
Write the current timestamp with the 'Start' marker to the logfile. Entry logged, slay.
π« $smoker->mark_out()
Write the current timestamp with the 'Stopped' marker to the logfile. Closing the book on this one.
π« Test::Smoke::Smoker->config( $key[, $value] )
config() is an interface to the package lexical %CONFIG, which holds all the default values for the new() arguments.
With the special key all_defaults this returns a reference to a hash holding all the default values. one call, every default, iconic behavior fr fr
π« $smoker->tty( $message )
Prints a message to the default filehandle.
π« $smoker->log( $message )
Prints a message to the logfile, filehandle.
π« $smoker->ttylog( $message )
Prints a message to both the default and the logfile filehandles. double the handles, double the slay
π« $smoker->smoke( $config[, $policy] )
smoke() takes a Test::Smoke::BuildCFG::Config object and runs all the basic steps as (private) object methods. She's doing the whole choreography, you just hand her the config. π§
π« $smoker->make_distclean( )
make_distclean() runs "make -i distclean 2>/dev/null".
π« $smoker->extra_manicheck( )
extra_manicheck() will only work for "$self->{v} > 1" and does an extra integrity check comparing MANIFEST and the source-tree. Output is send to the tty. yes, she'll double-check your MANIFEST, she's thorough like that
π« $smoker->handle_policy( $policy, @substs );
handle_policy() will try to apply the substition rules and then write the file Policy.sh.
π« $smoker->Configure( $config )
Configure() sorts out the MSWin32 mess and calls ./Configure.
returns true if a makefile was created β¨
π« $smoker->make_( )
make_() will run make.
returns true if a perl executable is found π
π« make_test_prep( )
Run "make test-prep" and check if t/perl exists.
π« $smoker->make_test( )
π« $self->extend_with_harness( @nok )
π« $smoker->make_test_harness
Use Test::Harness (the test_harness target) to get the failing test information and do not bother with TEST. she said skip TEST, we skip TEST
π« $smoker->_run_harness_target( $target, $extra )
The command to run "make test_harness" differs based on platform, so the arguments have to be passed into general routine. $target specifies the makefile-target, $makeopt specifies the extra options for the make program.
π« $smoker->_run_harness3_target( $target, $extra )
The command to run "make test_harness" differs based on platform, so the arguments have to be passed into general routine. $target specifies the makefile-target, $makeopt specifies the extra options for the make program.
π« $self->make_minitest
"make" was unable to build a perl executable, but managed to build miniperl, so we do "make minitest". smaller perl, same energy π
π« $self->_parse_harness_output( $\%notok, $all_ok, @lines )
Factor out the parsing of the Test::Harness output, as it seems subject to change. future-proofing, we love to see it
π« $self->_parse_harness3_output( $\%notok, $all_ok, @lines )
Fator out the parsing of the Test::Harness 3 output, as it seems subject to change. (yes the typo is canon, we keep it exactly as-is, no cap) π
π« $self->_transform_testnames( @notok )
_transform_testnames() takes a list of testnames, as found by "TEST" (testname without ".t" suffix followed by dots and a reason) and returns a hash with the filenames relative to the "t/" directory as keys and the reason as value.
π« $smoker->_normalize_testname( $test )
Normalize a testname... she's literally just normalizing, bestie
π« set_skip_tests( [$unset] )
Read from a MANIFEST like file, set in "$self->{skip_tests}", and rename the files in it with the extension .tskip. If $unset is set, they will be renamed back.
π« unset_skip_tests
Calls "$self->set_skip_tests( 1 )".
π« $self->change_manifest( \@tests, $unset )
π« $self->_run( $command[, $sub[, @args]] )
_run() returns qx( $command ) unless $sub is specified. If $sub is defined (and a coderef) "$sub->( $command, @args )" will be called.
π« $self->_make( $command )
_make() calls "run( "make $command" )", and does some extra stuff to help MSWin32 (the right maker, the directory).
π« $smoker->_make_fork( $target, $extra )
_make_fork() opens a read pipe to the make command with $target and $extra arguments for the make command.
π« $smoker->_vms__rooted_logical
This code sets up a rooted logical "TSP5SRC" and changes the {ddir} to that root. VMS besties, this one's for you π«Ά
π SEE ALSO π
Test::Smoke
π COPYRIGHT π
(c) 2002-2003, All rights reserved.
- Abe Timmerman
<abeltje@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See:
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
okay that's the whole page bestie, you ate π
this was perl v5.42.0, dated 2025-07-25, and yeah it's still Test::S...::Smoker(3) β go smoke something, ily, bye! π¦β¨π
π¦ where this page comes from
- fedora 43: perl-Test-Smoke 1.84-2.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms