configsmoke.3pm

Langue: en

Version: 2009-08-10 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

configsmoke.pl - Create a configuration for smokeperl.pl

SYNOPSIS

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

or regenerate from previous _config:

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

OPTIONS

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)
 
 

DESCRIPTION

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
 
 

CONFIGURATION

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
"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
"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
"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.11.x+ on unixy systems
perl510x.cfg for 5.10.x (MAINT) on unixy systems
perl58x.cfg for 5.8.x (MAINT) on unixy systems
w32current.cfg for 5.8.x+ on MSWin32
vmsperl.cfg for 5.8.x+ on OpenVMS
Nick Clark hardlink forest
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:
rsync
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

snapshot
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.
copy
This will use File::Copy and File::Find to just copy from a local source directory.
hardlink
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
"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.
skip_tests
This is a MANIFEST-like file with the paths to tests that should be skipped for this smoke.

The process involves on the fly modification of MANIFEST for tests in lib/ and ext/ and renaming of core-tests in t/.

force_c_locale
"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
"defaultenv", when set will make Test::Smoke remove $ENV{PERLIO} and only do a single pass "make test".
locale
"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
"{mail}" will set the new default for smokeperl.pl
mail_type
See Test::Smoke::Mailer and mailrpt.pl
w32args
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

vmsmake
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"
 
 
harnessonly
"harnessonly" indicates that "make test" is replaced by "make test_harness".
hasharness3
"hasharness3" is automagically set for perl version >= 5.11
harness3opts
"harness3opts" are passed to "HARNESS_OPTIONS" for the "make test_harness" step.
umask
"umask" will be set in the shell-script that starts the smoke.
renice
"renice" will add a line in the shell-script that starts the smoke.
v
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
"smartsmoke" indicates that the smoke need not happen if the patchlevel is the same after syncing the source-tree.
killtime
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.

adir
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).

delay_report
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.
PERL5LIB
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.
PERL5OPT
If you have a value for PERL5OPT 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
cron/crontab
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()
"save_config()" writes the configuration data to disk. If "Data::Dumper->can('Sortkeys')" it will order the keys.
sort_configkeys()
"sort_configkeys()" is the hook for Data::Dumper

Order and grouping by Merijn, thanks!

write_sh()
"write_sh()" creates the shell-script.
write_bat()
"write_bat()" writes the batch-file. It uses the ".cmd" extension because it uses commands that are not supported by COMMAND.COM
write_com
Write a simple DCL script that helps running the smoke suite.
default_buildcfg( $file_name, $pversion )
Check to see if $file_name exists. If not, copy the default config for $pversion to $file_name.
check_buildcfg
We will try to check the build configurations file to see if we should comment some options out.
finish_cfgcheck
"finish_cfgcheck()" will create a backup of the original file and write the new one in its place.
_perl_numeric_version( $dotted )
Normalize the dotted version to a numeric version.

TODO

Schedule, logfile optional

REVISION

In case I forget to update the $VERSION:
     $Id: configsmoke.pl 1241 2009-08-10 09:02:46Z 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.

See:

*
<http://www.perl.com/perl/misc/Artistic.html>
*
<http://www.gnu.org/copyleft/gpl.html>

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.