IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5109


Ignore:
Timestamp:
Sep 23, 2005, 8:58:01 AM (21 years ago)
Author:
desonia
Message:

fixed the script to find the object file even if automake prepends the
library name to it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/TestCoverage

    r5100 r5109  
    11#!/usr/bin/perl
    22#
    3 #  This is a perl script 
     3#  This is a perl script
    44#
    55#  SYNOPSIS:  SlocCount options topLevelDirectory
     
    1717#  RETURN : zero upon successful parsing of directories
    1818#
    19 #  $Revision: 1.1 $  $Name: not supported by cvs2svn $
    20 #  $Date: 2005-09-22 23:46:58 $
     19#  $Revision: 1.2 $  $Name: not supported by cvs2svn $
     20#  $Date: 2005-09-23 18:58:01 $
    2121#
    2222#  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    9696#     Description:  This subroutine will perform the necessary unit tests be
    9797#                   calling makeTestDrivers and executeTestDrivers  subroutines
    98 #                   and then check each subdirectory below the base directory 
     98#                   and then check each subdirectory below the base directory
    9999#                   recursively.
    100100#
     
    138138#
    139139#      Description:  This subroutine will parse the output file for the sloc
    140 #                    count. 
     140#                    count.
    141141#
    142142#      Parameter(s):  base directory where make and test drivers are located
     
    169169        close(OUTFILE);
    170170    }
    171    
     171
    172172    return($result[0]);
    173173}
     
    177177#  SUBROUTINE: getTestCoverage
    178178#
    179 #      Description:  This subroutine will 
     179#      Description:  This subroutine will
    180180#
    181181#      Parameter(s):  base directory where make and test drivers are located
     
    209209            if ( ( $files[$j] =~ m@\.c$@ ) ) {
    210210
     211                $objfile = $files[$j];
     212                $objfile =~ s/\.c$/\.o/;
     213                $objfile = `ls $base_dir/.libs/*$objfile`;
     214                chop $objfile;
     215                print "objfile=",$objfile,"\n";
    211216                # Increment total number of c files
    212217                $cfiles++;
    213218
    214219                # Call C source sloc count
    215                  system("gcov -f -o $base_dir/.libs $base_dir/$files[$j] > $base_dir/coverage");
     220                 print "gcov -f -o $objfile $base_dir/$files[$j] > $base_dir/coverage\n";
     221                 system("gcov -f -o $objfile $base_dir/$files[$j] > $base_dir/coverage");
    216222                 if ( $? == 0 ) {
    217223                     getFileCoverage($base_dir);
Note: See TracChangeset for help on using the changeset viewer.