3 # it is possible to run the coverage across multiple builds, but the
4 # coverage process is designed to report that SomeBinary has coverage
5 # percentage Y. Not, source file X has sum(across all compilations
6 # and tests) coverage. So what you end up with is a discrete coverage
7 # calculation for each platform for each source file. Which makes it
8 # pretty pointless to run this on more than one platform at a time.
10 # However, if you want to build a bunch at one, here is a representative set
11 #declare -a BUILDS=("multicore-linux-x86_64" "netlrts-linux-x86_64" "netlrts-linux-x86_64-smp")
13 if [[ "$#" -gt 0 ]]; then
19 echo "BUILD now $BUILDS";
23 declare -a BUILDS
=("netlrts-linux-x86_64-smp")
26 echo "testing builds $BUILDS"
28 /bin
/rm -f summary.txt
32 for b
in "${BUILDS[@]}" ; do
33 covbuild
="$b-covbuild"
34 echo "coverage base directory $covdir buildir $covbuild"
35 /bin
/rm -f "$b"-cov.info
37 if [ -d "$covbuild" ] ; then
38 /bin
/rm -rf "$covbuild"
40 .
/build LIBS
"$b" -j8 --suffix "covbuild" --coverage -O0 -save #-fprofile-update=atomic
42 make -j8 OPTS
+="--coverage -save"
44 make -j8 OPTS
+="--coverage -save"
47 testname
="$(cut -d'-' -f1 <<<"$b")"
48 testsuff
="$(cut -d'-' -f4 <<<"$b")"
49 if [ "$testsuff" = "smp" ] ; then
54 lcov
--capture --directory "$covbuild"/tmp
--rc lcov_branch_coverage
=1 --output-file "$covdir"/"$b"-cov.info
--test-name "$testname"
55 # lcov --add-tracefile "$b"-cov.info --output-file coverage/"$b"-total.info >> summary.txt
57 genhtml
"$covdir/$b-cov.info" --description-file tests.desc
-o "$covdir/$b"-cov-html >> gensummary.txt
63 gcc ck-convcore-summary.C
-o ckconv
64 for b
in "${BUILDS[@]}" ; do
65 .
/ckconv
"$b"-cov.info
>> summary.txt