++ed by:

1 PAUSE user
2 non-PAUSE users.

Author image Abe Timmerman


configsmoke.pl - Create a configuration for smokeperl.pl


    $ perl configsmoke.pl -p <prefix>[ -d <defaultsprefix>]

or regenerate from previous _config:

    $ perl configsmoke.pl -p <prefix> -des 


Current options:

  -d dfvalsprefix   Set prefix for a _dfconfig file (<prefix>)
  -c configprefix   When ommited 'perlcurrent' is used
  -j jclprefix      When ommited 'perlcurrent' is used
  -l logprefix      When ommited 'perlcurrent' is used
  -p prefix         Set -c and -j and -l at once

  -des              confirm all answers (needs previous _config)


Test::Smoke is the symbolic name for a set of scripts and modules that try to run the perl core tests on as many configurations as possible and combine the results into an easy to read report.

The main script is smokeperl.pl, and this uses a configuration file that is created by this program (configsmoke.pl). There is no default configuration as some actions can be rather destructive, so you will need to create your own configuration by running this program!

By default the configuration file created is called smokecurrent_config, this can be changed by specifying the -c <prefix> or -p <prefix> switch at the command line (-c will override -p when both are specified).

    $ perl configsmoke.pl -c mysmoke

will create mysmoke_config as the configuration file.

After you are done configuring, a small job command list is written. For MSWin32 this is called smokecurrent.cmd otherwise this is called smokecurrent.sh. Again the default prefix can be overridden by specifying the -j <prefix> or -p <prefix> switch.

All output (stdout, stderr) from smokeperl.pl and its sub-processes is redirected to a logfile called smokecurrent.log by the small jcl. (Use -l <prefix> or -p <prefix> to override).

There are two additional configuration default files smoke562_dfconfig and smoke58x_dfconfig to help you configure Test::Smoke for these two maintenance branches of the source-tree.

To create a configuration for the perl 5.8.x branch:

    $ perl configsmoke.pl -p smoke58x

This will read additional defaults from smoke58x_dfconfig and create smoke58x_config and smoke58x.sh/smoke58x.cmd and logfile will be smoke58x.log.

To create another configuration for the same branch (and have the right defaults) you can add the -d option:

    $ perl configsmokepl -p snap58x -d smoke58x

To create a configuration for the perl 5.6.2 brach:

    $ perl configsmoke.pl -p smoke562


Use of the program:

  • Values in angled-brackets (<>) are alternatives (none other allowed)

  • Values in square-brackets ([]) are default values (<Enter> confirms)

  • Use single space to clear a value

Here is a description of the configuration sections.


perl_version sets a number of default_values. This makes the smoke5?x_dfconfig files almost obsolete, although they still provide a nice way to set the prefix and set the perl_version.


ddir is the destination directory. This is used to put the source-tree in and build perl. If a source-tree appears to be there you will need to confirm your choice.


cfg is the path to the file that holds the build-configurations. There are several build-cfg files provided with the distribution:

perlcurrent.cfg for 5.9.x+ on unixy systems
perl58x.cfg for 5.8.x (MAINT) on unixy systems
perl562.cfg for 5.6.2 (MAINT) on unixy systems
perl55x.cfg for 5.005_04 (MAINT) on unixy systems
w32current.cfg for 5.8.x+ on MSWin32

Here is how Nick described it to me:

My plan is to use a few more directories, and avoid make distclean:

  1. rsync as before, but to a master directory. this directory is only used for rsyncing from the server

  2. copy that directory (as a hardlink forest) - gnu cp can do it as cp -lr, and I have a perl script to replicate that (which works nicely on FreeBSD) as a clean master source directory for this smoke session

  3. run the regen headers script (which 5.9.0 now has as a distinct script) rather than just a Makefile target

    I now have a clean, up-to-date source tree with accurate headers. For each smoking configuration

  4. copy that directory (hard links again)

  5. in the copy directory. Configure, build and test

  6. delete the copy directory

deleting a directory seems to be faster than make distclean.

sync_type (fsync)

sync_type (or fsync if you want_forest) can be one of four:


This will use the rsync program to sync up with the repository. configsmoke.pl checks to see if it can find rsync in your path.

The default switches passed to rsync are: -az --delete


This will use Net::FTP to try to find the latest snapshot on <ftp://ftp.funet.fi/languages/perl/snap/>.

You can also get the perl-5.8.x snapshots (and others) via HTTP if you have LWP installed. There are two things you should remember:

1. start the server-name http://
2. the snapshot-file must be specified.

Snapshots are not in sync with the repository, so if you have a working patch program, you can choose to "upgrade" your snapshot by fetching all the seperate patches from the repository and applying them.


This will use File::Copy and File::Find to just copy from a local source directory.

This will use File::Find and the link function to copy from a local source directory. (This is also used if you choose "forest".)

See also Test::Smoke::Syncer


pfile is the path to a textfile that holds the names of patches to be applied before smoking. This can be used to run a smoke test on proposed patches that have not been applied (yet) or to see the effect of reversing an already applied patch. The file format is simple:

  • one patchfile per line

  • optionally followed by ';' and options to pass to patch

  • optionally followed by ';' and a description for the patch

If the file does not exist yet, a skeleton version will be created for you.

You will need a working patch program to use this feature.

TODO: There is an issue when using the "forest" sync, but I will look into that.


force_c_locale is passed as a switch to mktest.pl to indicate that $ENV{LC_ALL} should be forced to "C" during make test.


defaultenv, when set will make Test::Smoke remove $ENV{PERLIO} and only do a single pass make test.


locale and its value are passed to mktest.pl and its value is passed to mkovz.pl. mktest.pl will do an extra pass of make test with $ENV{LC_ALL} set to that locale (and $ENV{PERL_UNICODE} = "";, $ENV{PERLIO} = "perlio";). This feature should only be used with UTF8 locales, that is why this is checked (by regex only).

If you know of a way to get the utf8 locales on your system, which is not coverd here, please let me know!


{mail} will set the new default for smokeperl.pl


See Test::Smoke::Mailer and mailrpt.pl


For MSWin32 we need some extra information that is passed to Test::Smoke::Smoker in order to compensate for the lack of Configure.

See "Configure_win32( )" in Test::Smoke::Util and W32Configure.pl


Get the make program to use for VMS (MMS or MMK). Start with the one this perl was build with.

make finetuning

Two different config options to accomodate the same thing: parallel build and serial testing

  * makeopt  => used by Test::Smoke::Smoker::_make()
  * testmake => use a different binary for "make _test"

umask will be set in the shell-script that starts the smoke.


renice will add a line in the shell-script that starts the smoke.


The verbosity level:

0: Be as quiet as possible
1: Give moderate information
2: Be as loud as possible

Every module has its own verbosity control and these are not verry consistent at the moment.


smartsmoke indicates that the smoke need not happen if the patchlevel is the same after syncing the source-tree.


When $Config{d_alarm} is found we can use alarm() to abort long running smokes. Leave this value empty to keep the old behaviour.

    07:30 => F<smokeperl.pl> is aborted on 7:30 localtime
   +23:45 => F<smokeperl.pl> is aborted after 23 hours and 45 minutes

Thank you Jarkko for donating this suggestion.


The smokereports are lost after a new SYNCTREE step, it might be handy to archive them along with the logfile.

If you want this then set the directory where you want the stored (empty value means no archiving).


Some filesystems do not support opening an already opened file. This makes it hard to scan the logfile for compiler messages. We can delay the creation of the report and call mailrpt.pl after smokeperl.pl. VMS might benefit.

ENV stuff

If you have a value for PERL5LIB set in the config environment, you could have it transferred tho the jcl-wrapperscript. Do not bother asking if it is not there.

schedule stuff

We try to detect 'crontab' or 'cron', read the contents of crontab -l, detect ourself and comment us out. Then we add an new entry.

MSWin32 at.exe

We only add a new entry, you will need to remove existing entries, as at.exe has not got a way comment-out entries.

Supporting subs


save_config() writes the configuration data to disk. If Data::Dumper->can('Sortkeys') it will order the keys.


sort_configkeys() is the hook for Data::Dumper

Order and grouping by Merijn, thanks!


write_sh() creates the shell-script.


write_bat() writes the batch-file. It uses the .cmd extension because it uses commands that are not supported by COMMAND.COM


Write a simple DCL script that helps running the smoke suite.

vms_whereis( $prog )

First look in the SYMBOLS to see if $prog is there. Next look in the KFE-table INSTALL LIST if it is there. As a last resort we can scan DCL$PATH like we do on *nix/Win32

default_buildcfg( $file_name, $pversion )

Check to see if $file_name exists. If not, copy the default config for $pversion to $file_name.


We will try to check the build configurations file to see if we should comment some options out.


finish_cfgcheck() will create a backup of the original file and write the new one in its place.


Schedule, logfile optional


In case I forget to update the $VERSION:

    $Id: configsmoke.pl 958 2006-05-07 15:53:57Z abeltje $


(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.


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.