Re: Fwd: CPAN Upload: A/AB/ABELTJE/maintsnap/Test-Smoke-1.18.02.tar.gz

[email protected] (Abe Timmerman) Sun, 10 Aug 2003 23:48:16 +0200
Newsgroups perl.perl5.porters,perl.daily-build
Organization ztreet
Message-ID <[email protected]>
Op een zonnige zomerdag (Sunday 10 August 2003 23:18), schreef Alan Burlison:

> Abe Timmerman wrote:
> >     3   Added a little archive script, that archives the report and the
> >         logfile.
>
> Where does it put them, and how long does it keep them for?

configsmoke.pl asks you about it (adir in *_config)
and they stay forever :-) [that is Test::Smoke doesn't touch them]

Alain found a bug in configsmoke.pl that affects the archive-dir bit and I 
send him the attached patch from the repository...

Good luck,

Abe
-- 
"Jarkko Hietaniemi" is actually the code name for a whole team of Finnish
super-programmers, capable of working continuously 25 hours a day without
tripping each other up, and running solely only on intravenous caffeine.
                                      -- Nicholas Clark on p5p @ 2002-03-04
ts360.patch (text/x-diff, 2.7 KB)
Index: configsmoke.pl
===================================================================
--- configsmoke.pl	(revision 359)
+++ configsmoke.pl	(revision 360)
@@ -13,7 +13,7 @@
 
 # $Id$
 use vars qw( $VERSION $conf );
-$VERSION = '0.025';
+$VERSION = '0.026';
 
 use Getopt::Long;
 my %options = ( 
@@ -152,6 +152,7 @@
         alt => [ ],
         dft => File::Spec->rel2abs( File::Spec->catdir( File::Spec->updir,
                                                         'perl-current' ) ),
+        chk => '.+',
     },
     use_old => {
         msg => "It looks like there is already a source-tree there.\n" .
@@ -199,12 +200,14 @@
         alt => [ ],
         dft => File::Spec->rel2abs( File::Spec->catdir( File::Spec->updir,
                                                         'perl-master' ) ),
+        chk => '.+',
     },
     forest_hdir => {
         msg => 'Where would you like the intermediate source-tree?',
         alt => [ ],
         dft => File::Spec->rel2abs( File::Spec->catdir( File::Spec->updir,
                                                         'perl-inter' ) ),
+        chk => '.+',
     },
     fsync => { 
         msg => "How would you like to sync your master source-tree?\n$syncmsg",
@@ -300,12 +303,14 @@
         msg => 'From which directory should the source-tree be copied?',
         alt => [ ],
         dft => undef,
+        chk => '.+',
     },
 
     hdir => {
         msg => 'From which directory should the source-tree be hardlinked?',
         alt => [ ],
         dft => undef,
+        chk => '.+',
     },
 
     patch => {
@@ -406,7 +411,7 @@
 \tLeave empty for no archiving.
 EOT
         alt => [ ],
-        dft => "",
+        dft => undef,
     },
     # Schedule stuff
     docron => {
@@ -1275,7 +1280,7 @@
 if test -f "\$LOCKFILE" && test -s "\$LOCKFILE" ; then
 $handle_lock
 fi
-echo "\$LOCKFILE" > "\$LOCKFILE"
+echo "\$CFGNAME" > "\$LOCKFILE"
 
 PATH=$cwd:$ENV{PATH}
 export PATH
@@ -1333,13 +1338,13 @@
 set CFGNAME=$options{config}
 set LOCKFILE=$options{prefix}.lck
 if NOT EXIST \%LOCKFILE\% goto START_SMOKE
-    FIND "\%LOCKFILE\%" \%LOCKFILE\% > NUL:
+    FIND "\%CFGNAME\%" \%LOCKFILE\% > NUL:
     if ERRORLEVEL 1 goto START_SMOKE
     echo We seem to be running [or remove \%LOCKFILE\%]>&2
     goto :EOF
 
 :START_SMOKE
-    echo \%LOCKFILE\% > \%LOCKFILE\%
+    echo \%CFGNAME\% > \%LOCKFILE\%
     set OLD_PATH=\%PATH\%
     set PATH=$cwd;\%PATH\%
     $^X smokeperl.pl -c "\%CFGNAME\%" \%* > "\%WD\%\\$options{log}" 2>&1
@@ -1416,6 +1421,11 @@
     
 
         my $dir = prompt( @_ );
+        if ( $dir eq "" && ! @{ $opt{ $_[0] }->{alt} } && 
+             ! $opt{ $_[0] }->{chk} ) {
+            print "Got []\n";
+            return "";
+        }
 
         # thanks to perlfaq5
         $dir =~ s{^ ~ ([^/]*)}