mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-24 15:25:00 +08:00
[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
This commit is contained in:
parent
bfe4775091
commit
6827c2f3b2
@ -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 ../..
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user