projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'devel/master' into tizen
[platform/core/uifw/dali-toolkit.git]
/
automated-tests
/
coverage.sh
diff --git
a/automated-tests/coverage.sh
b/automated-tests/coverage.sh
index
ad7d29b
..
11c534d
100755
(executable)
--- a/
automated-tests/coverage.sh
+++ b/
automated-tests/coverage.sh
@@
-1,6
+1,22
@@
#!/bin/bash
#!/bin/bash
-( cd ../build/tizen ; make cov_data )
+opt_genhtml=true
+if [ $1 == -n ] ; then
+ opt_genhtml=false
+fi
+
+BUILD_DIR_NAME=tizen
+function MakeCovData()
+{
+ ( cd ../build/$BUILD_DIR_NAME ; make cov_data )
+}
+
+MakeCovData
+if [[ $? -ne 0 ]]
+then
+ BUILD_DIR_NAME=tizen-cmake
+ MakeCovData
+fi
# From lcov version 1.10 onwards, branch coverage is off by default and earlier versions do not support the rc option
LCOV_OPTS=`if [ \`printf "\\\`lcov --version | cut -d' ' -f4\\\`\n1.10\n" | sort -V | head -n 1\` = 1.10 ] ; then echo "--rc lcov_branch_coverage=1" ; fi`
# From lcov version 1.10 onwards, branch coverage is off by default and earlier versions do not support the rc option
LCOV_OPTS=`if [ \`printf "\\\`lcov --version | cut -d' ' -f4\\\`\n1.10\n" | sort -V | head -n 1\` = 1.10 ] ; then echo "--rc lcov_branch_coverage=1" ; fi`
@@
-13,14
+29,19
@@
for i in `find . -name "*.dir"` ; do
if [[ $? -eq 0 ]]
then
lcov $LCOV_OPTS --directory . -c -o dali.info
if [[ $? -eq 0 ]]
then
lcov $LCOV_OPTS --directory . -c -o dali.info
- lcov $LCOV_OPTS --remove dali.info "/usr/include/*" "*/automated-tests/*" -o dali.info
+ lcov $LCOV_OPTS --remove dali.info "/usr/include/*" "/usr/local/include/*" "*/automated-tests/*" "*/dali-env/*" "*/third-party/*" -o dali.info
+ if [ ! -s dali.info ]
+ then
+ rm -f dali.info
+ fi
fi
)
done
(
fi
)
done
(
- cd .. ;
- genhtml $LCOV_OPTS -o build/tizen/doc/coverage `find . -name dali.info`
+ if [ $opt_genhtml == true ] ; then
+ cd .. ;
+ genhtml -p `pwd` $LCOV_OPTS -o build/$BUILD_DIR_NAME/doc/coverage `find . -name dali.info`
+ echo "Coverage output: ../build/$BUILD_DIR_NAME/doc/coverage/index.html"
+ fi
)
)
-
-echo "Coverage output: ../build/tizen/doc/coverage/index.html"