Ignore:
Timestamp:
2014-10-21T22:06:53+13:00 (10 years ago)
Author:
ak19
Message:
  1. There's always a deprecation warning on the switch statement used in task.pl. Replaced with plain if-else block. 2. The perl version found by diffcol is written out to the xml version of the report (not the html version). This may help in detecting new changes.
Location:
other-projects/nightly-tasks/diffcol/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • other-projects/nightly-tasks/diffcol/trunk/diffcol/diffcol.pl

    r28661 r29398  
    983983    #----##
    984984
     985# To find out what version of perl we're using
     986    if( $strOutputFormat eq "xml" ) {
     987        my $perloutput = `perl -v`;
     988        $perloutput =~ s@.*\((v\d+(\.\d+)*)\).*@$1@s;
     989        $ENV{'PATH'}="$ENV{'PERLPATH'}:$ENV{'PATH'}";       
     990        print "<perl-version>Perl version: $perloutput</perl-version>\n"; # die "<error>Perl version: $perloutput</error>\n";
     991    }
     992
    985993    #--Collection(s) Testing
    986994    foreach $strColName (@ARGV)
  • other-projects/nightly-tasks/diffcol/trunk/task.pl

    r28661 r29398  
    2222
    2323use Cwd;
    24 use Switch; # for switch(val) { case: ; ...}
     24#use Switch; # for switch(val) { case: ; ...}
    2525use File::Path; # for rmdir and mkdir type functions
    2626use File::Copy; # for recursive copying of folders but skipping .svn
     
    140140
    141141if(scalar(@ARGV) > 0) {   
    142     switch ($ARGV[0]) {
    143     case qr/^(-h|--?help|help)$/i { &printusage; exit 0; }
    144     case qr/^(setup_greenstone|run_test|summarise|upload|all)$/ { $action=$ARGV[0]; }
    145     else {
    146         print STDERR "**** Bad subcommand.\n";
    147         &printusage;
    148         exit -1;
    149     }
     142    #switch ($ARGV[0]) {
     143    #case qr/^(-h|--?help|help)$/i { &printusage; exit 0; }
     144    #case qr/^(setup_greenstone|run_test|summarise|upload|all)$/ { $action=$ARGV[0]; }
     145    #else {
     146        #print STDERR "**** Bad subcommand.\n";
     147        #&printusage;
     148        #exit -1;
     149    #}
     150    #}
     151
     152
     153    my $switch = $ARGV[0];
     154    if($switch =~ m/^(-h|--?help|help)$/i) {
     155    &printusage;
     156    exit 0;
     157    } elsif ($switch =~ m/^(setup_greenstone|run_test|summarise|upload|all)$/) {
     158    $action=$ARGV[0];
     159    } else {
     160    print STDERR "**** Bad subcommand.\n";
     161    &printusage;
     162    exit -1;
    150163    }
    151164
Note: See TracChangeset for help on using the changeset viewer.