Changeset 5109
- Timestamp:
- Sep 23, 2005, 8:58:01 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/TestCoverage (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/TestCoverage
r5100 r5109 1 1 #!/usr/bin/perl 2 2 # 3 # This is a perl script 3 # This is a perl script 4 4 # 5 5 # SYNOPSIS: SlocCount options topLevelDirectory … … 17 17 # RETURN : zero upon successful parsing of directories 18 18 # 19 # $Revision: 1. 1$ $Name: not supported by cvs2svn $20 # $Date: 2005-09-2 2 23:46:58$19 # $Revision: 1.2 $ $Name: not supported by cvs2svn $ 20 # $Date: 2005-09-23 18:58:01 $ 21 21 # 22 22 # Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 96 96 # Description: This subroutine will perform the necessary unit tests be 97 97 # 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 99 99 # recursively. 100 100 # … … 138 138 # 139 139 # Description: This subroutine will parse the output file for the sloc 140 # count. 140 # count. 141 141 # 142 142 # Parameter(s): base directory where make and test drivers are located … … 169 169 close(OUTFILE); 170 170 } 171 171 172 172 return($result[0]); 173 173 } … … 177 177 # SUBROUTINE: getTestCoverage 178 178 # 179 # Description: This subroutine will 179 # Description: This subroutine will 180 180 # 181 181 # Parameter(s): base directory where make and test drivers are located … … 209 209 if ( ( $files[$j] =~ m@\.c$@ ) ) { 210 210 211 $objfile = $files[$j]; 212 $objfile =~ s/\.c$/\.o/; 213 $objfile = `ls $base_dir/.libs/*$objfile`; 214 chop $objfile; 215 print "objfile=",$objfile,"\n"; 211 216 # Increment total number of c files 212 217 $cfiles++; 213 218 214 219 # 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"); 216 222 if ( $? == 0 ) { 217 223 getFileCoverage($base_dir);
Note:
See TracChangeset
for help on using the changeset viewer.
