cvs commit: smoke ChangeLog MANIFEST Makefile.PL smoke.cfg
[email protected] ("H.Merijn Brand") Wed, 26 Sep 2001 09:54:51 -0700
| Newsgroups | perl.qa.cvs |
|---|---|
| Message-ID | <[email protected]> |
hmbrand 01/09/26 09:54:51
Added: . ChangeLog MANIFEST Makefile.PL smoke.cfg
Log:
First try
Revision Changes Path
1.1 smoke/ChangeLog
Index: ChangeLog
===================================================================
*** Release 1.09
Wed 26 Sep 2001, Merijn
- Removed depricated perl.ok and perl.nok file stuff
harness log now printed to LOG :)
- added the missing is_win32 () function
- smoke.cfg less default than previous default (Blair)
- ask for umask, also enable 'none'
- log harness to the log, not to out
- actually *write* the cron we've prepared (Schwern)
- use crontab to (re)submit the new crontab instead of cron (Schwern)
- 'ps -f' doesn't work on Mac (Schwern)
*** Release 1.08
Tue 18 Sep 2001, Merijn
- MANIFEST check
- missed harness tests (Nick)
- Added changes for MSVC5 / dmake (Mattia)
- Several README changes
- Auto sensing mailer (mailx, sendmail, mail) in that order
from Makefile.PL
- Changed subject in mkovz.pl (easier sorting and perusal in
smokers-reports)
*** Release 1.07
Mon 10 Sep 2001, Merijn
- Matrix entries could be initialized with scalars ?-( (Nick)
- References to the webresources in README
- fail on non cd-able $PC in smoke.sh (Will)
*** Release 1.06
Mon 03 Sep 2001, Merijn
- Makefile.PL's thoughts of smoking dir now more safe and robust
- Added warning in README for --delete effects
- VERSION now only in Makefile.PL and mkovz.pl (and ChangeLog :)
- mkovz.pl changed to use mail if mailx not found in PATH
*** Release 1.05
Thu 30 Aug 2001, Merijn
- safeguard for "=" with clipping cfg lines (Nick)
- still more backward compatibility (Will)
- report shows smoke version
- Makefile.PL should be doing the right stuff now
*** Release 1.04
Tue 28 Aug 2001, Merijn
- harness only started if real failures (improved noise filter)
- added "make regen_headers" as of Arthur's request
- removed 2>&1 in commends, cause it's redirected anyway
- removed unneeded (undef) in local declaration
*** Release 1.03
Mon 27 Aug 2001, Merijn, Nick
- exits from smoke.sh more verbose (Nick)
- several typo's, some harmless
- removed -Dusereentrant as of my own request
- optimized away longdoubles for freebsd
- freebsd has mailx not in default path
- removed a multi-OS leftover from mkovz.pl
- removed 5.6 requirements (reluctantly)
- Nick's external configuration system
- docs for optional smoke.cfg to mktest.pl
- safer config parsing
- syntax now still OK for 5.005_03
*** Release 1.02
Thu 23 Aug 2001, Merijn
- mkovz.pl accepts smoke folder as second argument
- Michael's changes from Aug 22
- smoke.sh expands $PATH with folder of smoke.sh
- smoke.sh accepts test tree folder as argument
- entered README
- entered MANIFEST
- entered ChangeLog
- entered Makefile.PL (don't use that yet!)
1.1 smoke/MANIFEST
Index: MANIFEST
===================================================================
MANIFEST
README
ChangeLog
Makefile.PL
smoke.sh
smoke.cfg
mktest.pl
mkovz.pl
1.1 smoke/Makefile.PL
Index: Makefile.PL
===================================================================
#!/usr/local/bin/perl -w
use strict;
use ExtUtils::MakeMaker;
use File::Copy;
use Cwd qw(cwd abs_path);
print "\nConfiguring the smoke test suite ...\n\n";
$^O =~ m/^(?: VMS | MSWin32 )$/x and
die "OS type $^O is not (yet) supported for automatic configuration";
WriteMakefile (
NAME => "Test::Smoke",
DISTNAME => "Test-Smoke",
VERSION => "1.09",
AUTHOR => 'H.Merijn Brand <[email protected]> and '.
'Nicholas Clark <[email protected]>',
dist => { COMPRESS => "gzip -9f",
SUFFIX => ".gz",
},
);
my $sh = "";
{ local (*SH, $/);
open SH, "< smoke.sh" or die "smoke.sh: $!";
$sh = <SH>;
close SH;
}
my $sd = cwd;
$sh =~ s/`pwd`:/$sd:/;
while (1) {
print "What directory do you want to use for the source tree ?\n";
print "[ /usr/CPAN/perl-current ] > ";
chomp (my $dir = scalar <STDIN>);
$dir ||= "/usr/CPAN/perl-current";
unless (-d $dir) {
my ($p, $d) = ("", $dir);
while ($d =~ m:^(.*?/)(.*):) {
$p .= $1;
$d = $2;
mkdir $p, 0755;
}
}
mkdir $dir, 0755;
unless (-d $dir) {
print "$dir is not a directory or cannot be created: $!\n";
redo;
}
$dir = abs_path ($dir);
$dir ne "/usr/CPAN/perl-current" and $sh =~ s:/usr/CPAN/perl-current:$dir:;
if ($dir eq $sd) {
print "You cannot choose the current folder as you smoking dir,\n",
"because 'rsync --delete' will throw away the test files\n\n";
redo;
}
opendir DIR, $dir;
my %f = map { $_ => 1 } grep !m/^\.+$/, readdir DIR;
closedir DIR;
if (exists $f{".patch"} && exists $f{MANIFEST} && exists $f{Configure}) {
print "$dir looks like it already has a source tree.\n",
"Do you still want to use it for smoke tests? [y/N] > N\b";
scalar <STDIN> =~ m/^[YyJjOoTt1]/ or # Yes, Ja, Oui, True, 1
redo;
}
elsif (grep !m/^\.(patch|config)$/, grep m/^\./, keys %f) {
print "$dir has dot-files, which is likely an unsafe location to\n",
"start smoking from since these are deleted during smoke.\n\n",
"Are you sure you want to use it? [y/N] > N\b";
scalar <STDIN> =~ m/^[YyJjOoTt1]/ or # Yes, Ja, Oui, True, 1
redo;
}
elsif (keys %f) {
print "WARNING: $dir has files.\n\n",
" these will - most probably - be deleted during rsync\n",
" check if you are unsure!\n\n";
}
last;
}
open STDERR, ">&STDOUT";
my $time = "random";
if (grep m/\bcron$/, `ps -e`) {
my ($m, $h);
while (1) {
print "At what time do you want the smoke to start ?\n";
print "[ 22:25 ] > ";
chomp ($time = scalar <STDIN>);
$time ||= "22:25";
($h, $m) = ($time =~ m/^([01]?\d|2[0-3]):([0-5]?\d)$/) and last;
}
if (open CRON, "crontab -l |") {
my @cron = <CRON>;
close CRON;
grep m/\bsmoke\.sh\b/, @cron or
push @cron, "$m $h * * * sh $sd/smoke.sh 2>&1\n";
for (@cron) {
m/\bsmoke\.sh\b/ or next;
s/^\d+\s+\d+/$m $h/ and last;
}
print "I've changed your crontab entries like this\n",
(map { " $_" } @cron),
"Shall I use it? [Y/n] > Y\b";
unless (scalar <STDIN> =~ m/^[NnFf0]/) { # No, Nee, Nein, Non, False, 0
open CRON, "> cron.tab" or die "cron.tab: $!";
print CRON @cron;
close CRON;
system "crontab cron.tab";
unlink "cron.tab";
}
}
else {
print "Cannot read current crontab\n";
}
}
else {
print "I can't find a cron process. No automatic starting\n";
}
my $conf = "";
while (!(-f $conf && -s _)) {
print "What configuration file do you want to use ?\n";
print "[ smoke.cfg ] > ";
chomp ($conf = scalar <STDIN>);
$conf ||= "smoke.cfg";
-f $conf && -s _ or print "$conf is not a valid smoke configuration\n";
}
$conf ne "smoke.cfg" and $sh =~ s:\bsmoke\.cfg\b:$conf:;
my $umask = "";
print "In order to prevent test failures that are not realy interesting to\n",
"the smoke suite, like removing files that are write protected, I'd\n",
"like to run with 'umask 0'.\n",
"What umask can I use (use 'none' to not set at all) ? [0] > 0\b";
chomp ($umask = scalar <STDIN>);
$umask =~ m/^none$/i and $sh =~ s/^umask 0$//m;
$umask =~ m/^[0-7]+$/ and $sh =~ s/^umask 0$/umask $umask/m;
move ("smoke.sh", "smoke.sh.org");
open SH, "> smoke.sh" or die "smoke.sh: $!";
print SH $sh;
close SH;
chmod 0755, "smoke.sh";
foreach my $m (qw(mailx sendmail mail)) {
my $mp;
foreach my $d ((split m/:/, $ENV{PATH}), "/usr/sbin", "/usr/lib") {
-x "$d/$m" or next;
$mp = "$d/$m";
last;
}
$mp or next;
local $/ = undef;
open OVZ, "< mkovz.pl" or die "mkovz.pl: $!";
my $ovz = <OVZ>;
close OVZ;
$ovz =~ s/"mailx"/"$mp"/;
move ("mkovz.pl", "mkovz.pl.org");
open OVZ, "> mkovz.pl" or die "mkovz.pl: $!";
print OVZ $ovz;
close OVZ;
chmod 0755, "mkovz.pl";
last;
}
print <<EOM;
All done.
If everything works out fine, and you allowed me to persue the changes,
Perl Core smoking will take place everyday at $time.
Thanks for participating
EOM
1.1 smoke/smoke.cfg
Index: smoke.cfg
===================================================================
# This is a configuration file for the smoke tester.
# Lines starting with # are comments.
# Lines starting with = are section breaks. The rest of the line will be ignored
# Lines starting with / signify a pattern to substitute for in Policy.sh
# They don't count as a normal line
# This happens to be a section, but because it's *all* just blank lines
# (comments are ignored) this whole section will be ingored.
# Each normal line of a section defines a command line argument to Configure
# A blank line in a normal section means an argument of ""
# Each line from the first section is tried with each line of the second
# section with each line of the third section ...
# As this default configuration file has 3 (non-empty) sections with 2, 8,
# and 2 lines defining Configure arguments it will build 32 variations of
# perl, each of them will be tested with $PERLIO = "stdio" and "perlio" so
# yielding 64 status letters
==
-Dusethreads -Duseithreads
==
-Uuseperlio
-Duseperlio
-Duseperlio -Duse64bitint
-Duseperlio -Duse64bitall
-Duseperlio -Duselongdouble
-Duseperlio -Dusemorebits
-Duseperlio -Duse64bitall -Duselongdouble
==
# The pattern must have leading and trailing '/' characters in this
# configuration file. The smoke tester will globally substitute this pattern
# with each Congfigure argument in this section (as well as passing them on
# the command line to Configure)
# This is usually used with the cflags parameter in Policy.sh, which defines
# flags to pass to the C compiler. The default Policy.sh contains the line
# "ccflags='-DDEBUGGING'" and this pattern will cause the value in the '' to
# be replaced with an empty string and then -DDEBUGGING.
# (It may seem a bit convaluted making a system to replace -DDEBUGGING with
# the same string -DDEBUGGING, but it means that a site's valid Policy.sh
# can be used for smoke testing)
#
# Hopefully it will not be a problem that the arguments are both substituted
# into cflags and passed on the commandline to Configure, as Configure will
# ignore arguments starting -D that it does not recognise.
#
# You can specify the same pattern in more than one section. In this case
# the substitution replacement will be all Configure arguments joined with
# spaces. This lets you have one section testing ("", "-DDEBUGGING"), a
# second testing ("", "-DCRIPPLED_CC") and have cflags set correctly for the
# 4 combinations.
/-DDEBUGGING/
-DDEBUGGING