Index: /trunk/psLib/src/TestCoverage
===================================================================
--- /trunk/psLib/src/TestCoverage	(revision 5108)
+++ /trunk/psLib/src/TestCoverage	(revision 5109)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
 #
-#  This is a perl script 
+#  This is a perl script
 #
 #  SYNOPSIS:  SlocCount options topLevelDirectory
@@ -17,6 +17,6 @@
 #  RETURN : zero upon successful parsing of directories
 #
-#  $Revision: 1.1 $  $Name: not supported by cvs2svn $
-#  $Date: 2005-09-22 23:46:58 $
+#  $Revision: 1.2 $  $Name: not supported by cvs2svn $
+#  $Date: 2005-09-23 18:58:01 $
 #
 #  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -96,5 +96,5 @@
 #     Description:  This subroutine will perform the necessary unit tests be
 #                   calling makeTestDrivers and executeTestDrivers  subroutines
-#                   and then check each subdirectory below the base directory 
+#                   and then check each subdirectory below the base directory
 #                   recursively.
 #
@@ -138,5 +138,5 @@
 #
 #      Description:  This subroutine will parse the output file for the sloc
-#                    count. 
+#                    count.
 #
 #      Parameter(s):  base directory where make and test drivers are located
@@ -169,5 +169,5 @@
         close(OUTFILE);
     }
-    
+
     return($result[0]);
 }
@@ -177,5 +177,5 @@
 #  SUBROUTINE: getTestCoverage
 #
-#      Description:  This subroutine will 
+#      Description:  This subroutine will
 #
 #      Parameter(s):  base directory where make and test drivers are located
@@ -209,9 +209,15 @@
             if ( ( $files[$j] =~ m@\.c$@ ) ) {
 
+                $objfile = $files[$j];
+                $objfile =~ s/\.c$/\.o/;
+                $objfile = `ls $base_dir/.libs/*$objfile`;
+                chop $objfile;
+                print "objfile=",$objfile,"\n";
                 # Increment total number of c files
                 $cfiles++;
 
                 # Call C source sloc count
-                 system("gcov -f -o $base_dir/.libs $base_dir/$files[$j] > $base_dir/coverage");
+                 print "gcov -f -o $objfile $base_dir/$files[$j] > $base_dir/coverage\n";
+                 system("gcov -f -o $objfile $base_dir/$files[$j] > $base_dir/coverage");
                  if ( $? == 0 ) {
                      getFileCoverage($base_dir);
