NAME
configsmoke.pl - Create a configuration for smokeperl.pl
SYNOPSIS
$ perl configsmoke.pl -p <prefix>[ -d <defaultsprefix>]
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
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.8.x+ on unixy systems
- w32current.cfg for 5.8.x+ on MSWin32
- perl562.cfg for 5.6.2 (MAINT) on unixy systems
Note: 5.6.2 on MSWin32 is not yet provided, but commenting out the -Duselargefiles section from w32current.cfg should be enough.
- 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:
rsync as before, but to a master directory. this directory is only used for rsyncing from the server
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
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
copy that directory (hard links again)
in the copy directory. Configure, build and test
delete the copy directory
deleting a directory seems to be faster than make distclean.
- sync_type (fsync)
-
sync_type
(orfsync
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:
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
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
-
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 passmake 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}
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
- 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
-
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:
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 usealarm()
to abort long running smokes. Leave this value empty to keep the old behaviour.07:30 => F<mktest.pl> is aborted on 7:30 localtime +23:45 => F<mktest.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).
- schedule stuff
Supporting subs
- save_config()
-
save_config()
writes the configuration data to disk. IfData::Dumper->can('Sortkeys')
it will order the keys. - sort_configkeys()
-
sort_configkeys()
is the hook for Data::DumperOrder 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 - 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.
TODO
Schedule, logfile optional
REVISION
In case I forget to update the $VERSION
:
$Id: configsmoke.pl 641 2004-03-07 17:22:36Z abeltje $
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.