IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5111


Ignore:
Timestamp:
Sep 23, 2005, 9:03:12 AM (21 years ago)
Author:
desonia
Message:

added check to handle c files that are not yet included into the library.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/TestCoverage

    r5110 r5111  
    1717#  RETURN : zero upon successful parsing of directories
    1818#
    19 #  $Revision: 1.3 $  $Name: not supported by cvs2svn $
    20 #  $Date: 2005-09-23 18:58:49 $
     19#  $Revision: 1.4 $  $Name: not supported by cvs2svn $
     20#  $Date: 2005-09-23 19:03:12 $
    2121#
    2222#  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    211211                $objfile = $files[$j];
    212212                $objfile =~ s/\.c$/\.o/;
    213                 $objfile = `ls $base_dir/.libs/*$objfile`;
     213                $objfile = `find $base_dir/.libs -name "*$objfile"`;
    214214                chop $objfile;
    215                 # Increment total number of c files
    216                 $cfiles++;
    217 
    218                 # Call C source sloc count
    219                  system("gcov -f -o $objfile $base_dir/$files[$j] > $base_dir/coverage");
    220                  if ( $? == 0 ) {
    221                      getFileCoverage($base_dir);
    222                  }
    223                  if ( -e "$base_dir/coverage" ) {
    224                      system("rm $base_dir/coverage");
    225                  }
     215
     216                if (length($objfile) > 0) {
     217                    # Increment total number of c files
     218                    $cfiles++;
     219
     220                    # Call C source sloc count
     221                    system("gcov -f -o $objfile $base_dir/$files[$j] > $base_dir/coverage");
     222                    if ( $? == 0 ) {
     223                        getFileCoverage($base_dir);
     224                    }
     225                    if ( -e "$base_dir/coverage" ) {
     226                        system("rm $base_dir/coverage");
     227                    }
     228                }
    226229            }
    227230        }
Note: See TracChangeset for help on using the changeset viewer.