Test::S...::Smoker(3)

πŸ“¦
version 1.84 Β· 2 versions
, in fedora 43

πŸ’– 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_MINIPERL
  • BUILD_NOTHING
  • BUILD_PERL
  • HARNESS3_RE_EXTRA
  • HARNESS3_RE_FAILED
  • HARNESS3_RE_TODO
  • HARNESS_RE1
  • HARNESS_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 directory
  • fdir β€” The forest source
  • v β€” verbose level: 0..2
  • defaultenv β€” '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 runs
  • is_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

(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