summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMike McGreevy <mamcgree@hdfgroup.org>2008-05-06 17:14:14 (GMT)
committerMike McGreevy <mamcgree@hdfgroup.org>2008-05-06 17:14:14 (GMT)
commit6827c2f3b2452e592d51ca90a807d446c27d43d0 (patch)
tree84ef9e2a90f88993d7a3cccac20ef8e21f4f3c71 /bin
parentbfe4775091213c04f2bb1d61f2340989932c9056 (diff)
downloadhdf5-6827c2f3b2452e592d51ca90a807d446c27d43d0.zip
hdf5-6827c2f3b2452e592d51ca90a807d446c27d43d0.tar.gz
hdf5-6827c2f3b2452e592d51ca90a807d446c27d43d0.tar.bz2
[svn-r14939] Purpose: Bug Fix (Bug 794)
Description: Test gcov script on kagiso Solution: The bin/gcov_script was not working on kagiso (it was written to be used on heping, but since we don't have heping anymore, we need it on kagiso). There was a problem in that the generated .gcda files were being created in the /src/.libs directory when the script was expecting them to be in the /src directory. Also, -lgcov was added to LDFLAGS. The script performs configuration of HDF5 and runs the tests, and generates code coverage statistics for the source code files, which it places in the gcov_logs directory. The individual *.gcov files show the number of times each individual line of the associated source file is executed, and displays branches tken information as well. The file gcov.log shows a summary of each source file's coverage statistics in one easily accessible file. Tested: kagiso
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gcov_script37
1 files changed, 19 insertions, 18 deletions
diff --git a/bin/gcov_script b/bin/gcov_script
index 4900efb..ac82189 100755
--- a/bin/gcov_script
+++ b/bin/gcov_script
@@ -17,36 +17,37 @@
# Configures, builds, and runs tests in-place; the output files will be placed
# in a directory called gcov_logs.
# Must be invoked from the root hdf5 directory.
-# This script has only been tested on heping.
+# This script has been tested on kagiso.
CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs"
export CFLAGS
-./configure --enable-debug=all
+LDFLAGS="$LDFLAGS -lgcov"
+export LDFLAGS
+CC=gcc
+export CC
+./configure
make
make check
mkdir gcov_logs
cd src
-for j in *.c
+for j in *.h *.c
+ do
+ ln -s ../$j .libs/$j
+ done
+cd .libs
+for j in *.gcda
do
gcov -b $j >> gcov.log 2>&1
done
for j in *.gcov
+ do
+ mv $j ../../gcov_logs
+ done
+mv gcov.log ../../gcov_logs
+for j in *.c *.h
do
- mv $j ../gcov_logs
+ rm $j
done
-mv gcov.log ../gcov_logs
-cd ..
-
-
-
-
-
-
-
-
-
-
-
-
+cd ../..