Changeset 2578 in /cluster/svnroot


Ignore:
Timestamp:
Aug 24, 2010 8:38:59 AM (10 years ago)
Author:
leemasa
Message:

Fixed an error in bccd_test_suite that occurs when a test file does not exist for comparison in one of the control or test directories.(#524)

Location:
bccd-ng/branches/leemasa-devel/trees/home/bccd/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bccd-ng/branches/leemasa-devel/trees/home/bccd/tests/bccd_test_suite.pl

    r2523 r2578  
    99
    1010use bccd_test_suite;
    11 use ezmail;
    1211
    1312#Constants
     
    9190    for (my $i = 0; $testlist[$i] ne $SEPARATOR_STRING and $i < @testlist; ++$i){
    9291                my $test = $testlist[$i];
     92                if (-e "$testdir/$test.dat" or -e "$controldir/$test.dat"){
     93                        system("touch $testdir/$test.dat $controldir/$test.dat") or die "Error creating empty test file: $!";
     94                }
    9395                system ("diff $testdir/$test.dat $controldir/$test.dat > $diffdir/$test.diff"); #examine differences, output to file.
    9496                my @diff_lines_raw #count lines in differences files.
  • bccd-ng/branches/leemasa-devel/trees/home/bccd/tests/bccd_test_suite.pm

    r2523 r2578  
    8181                        mpirun -np 2 ~/$testname/$testname      $storeOutput");
    8282#XXX This function is untested from here on.
    83         if (`wc -l ~/machines | awk '{print \$1}'` > 1){
     83        if (not -e "~/machines" or `wc -l ~/machines | awk '{print \$1}'` > 1){
    8484                system("bccd-syncdir . ~/machines       &> tmpoutput");
    8585                system("cat tmpoutput $storeOutput");
    8686
    8787#get path to temporary directory
    88                 my $tempDirectory = get_syncdir("tmpoutput");
    89                 unlink "tmpoutput";
     88                if (-s "tmpoutput"){
     89                        my $tempDirectory = get_syncdir("tmpoutput");
     90                        unlink "tmpoutput";
     91                        system("mpirun -machinefile ~/machines\
     92                                -np 2 $tempDirectory/$testname  $storeOutput");
     93                } else {
     94                        output ($OUTPUT, "syncdir error.")
     95                }
    9096
    91                 system("mpirun -machinefile ~/machines\
    92                                 -np 2 $tempDirectory/$testname  $storeOutput");
    9397        }
    9498        else{
Note: See TracChangeset for help on using the changeset viewer.