There was a speaker cancellation at tonight's meeting of the New York
City BSD Users Group (http://www.nycbug.org/), so the meeting became
'open format'. I volunteered to give a summary of current developments
in Parrot. I improvised for about 12 minutes, but with Q&A I had the
floor for a total of 35 minutes.
In the course of the discussion one member challenged me, "Suppose I
want to start smoke testing Parrot tonight. Is there one shell script I
could run that would do it all?"
I didn't have an answer off the top of my head but promised to get back
to him. When I got home, I wrote the attached Perl 5 program. Perl 5
for two reasons: (1) I think much faster in Perl than in shell; (2)
Certain CPAN modules are needed for submission of the tarball to Smolder.
The objective would be a program someone could drop into a cron job and
have it run once a day, cleaning up after itself.
This is a first draft, so suggestions for improvement are welcome.
Thank you very much.
kid51
#!/usr/local/bin/perl
# parrot_make_smolder.pl
use strict;
use warnings;
use Data::Dumper;
use Carp;
use Cwd;
use File::Temp qw( tempdir );
use Archive::Tar;
use TAP::Harness::Archive;
my $configure_log = q{parrot_configure.log};
my $cwd = cwd();
{
my $tdir = tempdir( CLEANUP => 1 );
chdir $tdir or croak "Unable to change to temporary directory";
system(qq{svn co https://svn.parrot.org/parrot/trunk parrot})
and croak "Unable to check out Parrot trunk from repository";
chdir q{parrot} or croak "Unable to change to top-level Parrot directory";
system(qq{$^X Configure.pl --test 2>&1 | tee $configure_log})
and croak "Parrot configuration or pre-/post-configuration testing did
not complete successfully";
system( qq{make && make smolder_test 2>&1} )
and croak "Unable to complete 'make' and/or 'make smolder_test'";
chdir $cwd or croak "Unable to change back to starting directory";
}
print localtime() . ": completed Parrot Smolder report\n";
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev