Changeset 2268 in /cluster/svnroot


Ignore:
Timestamp:
Mar 21, 2010 9:40:51 PM (11 years ago)
Author:
skylar
Message:

merging in checks for build failure (#475)

Location:
bccd-ng/trunk
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • bccd-ng/trunk/packages/usr/local/lib/site_perl/5.10.0/Bccd/TestDb.pm

    r2157 r2268  
    1212$ENV{'PGHOST'} = "hopper.cluster.earlham.edu";
    1313
    14 my $websvn = "http://bccd-ng.cluster.earlham.edu/svn/bccd-ng/branches/fitz-devel/";
     14my $websvn = "http://bccd-ng.cluster.earlham.edu/svn/bccd-ng/trunk/";
    1515
    1616BEGIN {
     
    2020
    2121    @ISA = qw(Exporter);
    22     @EXPORT_OK = qw( &open_db &insert_results );
     22    @EXPORT_OK = qw( &open_db &insert_results &check_build_failure );
    2323}
    2424
     
    101101}
    102102
     103sub check_build_failure {
     104        my($dbh) = @_;
     105
     106        my $sql = "SELECT description FROM last_build";
     107
     108    my $sth = $dbh->prepare($sql) || die "Prepare error: ($sql) $DBI::errstr\n";
     109        my $status = $sth->execute()
     110                || die "Execute error: ($sql) $DBI::errstr\n";
     111
     112        my @select = $sth->fetchrow_array();
     113        if($select[0] ne 'SUCCESS') {
     114                return undef;
     115        }
     116
     117        return 0;
     118}
     119
    1031201;
Note: See TracChangeset for help on using the changeset viewer.