(Coverage) Remove system & third-party files, fix path shown in html 69/256269/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 31 Mar 2021 18:53:22 +0000 (19:53 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 31 Mar 2021 18:53:25 +0000 (19:53 +0100)
- Removed files in /usr/local/*
- Removed files in third-party directories
- Specified the prefix to strip from genhtml rather than it working it
  out on its own, now we don't see the full path of the files in
  dali-scene-loader anymore

Change-Id: Ie6c548a0b641e078ef07c2e7502119372c01ba85

automated-tests/coverage.sh
build/tizen/CMakeLists.txt
build/tizen/dali-scene-loader/CMakeLists.txt

index 96c3740ea27dd65753e4656e9afbf7b1e6e5f100..11c534dd0a85048baf70888e24543f9d3defea99 100755 (executable)
@@ -29,7 +29,7 @@ for i in `find . -name "*.dir"` ; do
         if [[ $? -eq 0 ]]
         then
             lcov $LCOV_OPTS --directory . -c -o dali.info
-            lcov $LCOV_OPTS --remove dali.info "/usr/include/*" "*/automated-tests/*" "*/dali-env/*" -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
@@ -41,7 +41,7 @@ done
 (
     if [ $opt_genhtml == true ] ; then
         cd .. ;
-        genhtml $LCOV_OPTS -o build/$BUILD_DIR_NAME/doc/coverage `find . -name dali.info`
+        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
 )
index a7bc0e62a3675904eccf969c7a09db6866c89ed8..8be262546e22a68d616a90c27aab6cf81fa49934 100644 (file)
@@ -472,9 +472,9 @@ IF( ENABLE_COVERAGE )
     ADD_CUSTOM_TARGET( ${DALI_TOOLKIT_PREFIX}rename_cov_data ./rename-cov-data )
 
     ADD_CUSTOM_TARGET( ${DALI_TOOLKIT_PREFIX}cov_data ${LCOV_BIN} ${LCOV_OPTS} --base-directory . --directory . -c -o dali.info
-      COMMAND ${LCOV_BIN} ${LCOV_OPTS} --remove dali.info \"*/dali-env/*\" \"/usr/include/*\" "*/dali-env/*" "*solid-color-actor*" "*/dali-toolkit/third-party/*" \"*/dali-scene-loader/third-party/*\" -o dali.info )
+      COMMAND ${LCOV_BIN} ${LCOV_OPTS} --remove dali.info \"*/dali-env/*\" \"/usr/include/*\" \"*/dali-env/*\" \"*solid-color-actor*\" \"*/dali-toolkit/third-party/*\" \"*/dali-scene-loader/third-party/*\" -o dali.info )
 
-    ADD_CUSTOM_TARGET( ${DALI_TOOLKIT_PREFIX}coverage genhtml ${LCOV_OPTS} -o ${COVERAGE_OUTPUT_DIR} dali.info
+    ADD_CUSTOM_TARGET( ${DALI_TOOLKIT_PREFIX}coverage genhtml -p ${ROOT_SRC_DIR} ${LCOV_OPTS} -o ${COVERAGE_OUTPUT_DIR} dali.info
       DEPENDS cov_data )
 
     ADD_CUSTOM_TARGET( ${DALI_TOOLKIT_PREFIX}reset_coverage @${LCOV_BIN} -z --directory `pwd` )
index d3ebe7d3f645566c3832fa21a79bb00963f514a8..ae7fea24d544a5197de8b518328b010b719a97ad 100644 (file)
@@ -68,63 +68,6 @@ if (ENABLE_PKG_CONFIGURE)
        configure_file(${CMAKE_CURRENT_LIST_DIR}/${core_pkg_cfg_file}.in ${core_pkg_cfg_file} @ONLY)
 endif()
 
-if (ENABLE_COVERAGE)
-       find_program(lcov_bin "lcov")
-       if (${lcov_bin})
-               set(cov_dir ".cov")
-               set(cov_output_dir "doc/coverage")
-
-               execute_process(COMMAND bash -c "${lcov_bin} --version | cut -d' ' -f4" OUTPUT_VARIABLE lcov_version)
-               string(REPLACE "." ";" lcov_vlist ${lcov_version})
-               if (NOT $<VERSION_LESS:${lcov_version},"1.10"> )
-                       set(lcov_opts --rc lcov_branch_coverage=1)
-               endif()
-
-               add_custom_target(${prefix}rename_cov_data ./rename-cov-data)
-
-               add_custom_target(${prefix}cov_data
-                       ${lcov_bin} ${lcov_opts} --base-directory . --directory . -c -o dali.info
-                       COMMAND ${lcov_bin} ${lcov_opts} --remove dali.info \"*/dali-env/*\" \"/usr/include/*\" \"/usr/local/include/*\" \"*/dali-env/*\" \"*/dali-scene-loader/third-party/*\" -o dali.info
-               )
-
-               add_custom_target(${prefix}coverage genhtml ${lcov_opts} -o ${cov_output_dir} dali.info)
-
-               add_custom_target(${prefix}reset_coverage @${lcov_bin} -\ --direwctory `pwd`)
-
-               add_custom_target(${prefix}distclean @echo cleaning for source distribution)
-               add_custom_command(
-                       DEPENDS ${prefix}clean
-                       COMMENT "distribution clean"
-                       COMMAND find
-                       ARGS .
-                       -not -name config.cmake -and \(
-                       -name tester.c -or
-                       -name Testing -or
-                       -name CMakeFiles -or
-                       -name doc -or
-                       -name cmake.depends -or
-                       -name cmake.check_depends -or
-                       -name CMakeCache.txt -or
-                       -name cmake.check_cache -or
-                       -name *.cmake -or
-                       -name Makefile -or
-                       -name core -or
-                       -name core.* -or
-                       -name gmon.out -or
-                       -name install_manifest.txt -or
-                       -name *.pc -or
-                       -name *.gcov -or
-                       -name *.gcno -or
-                       -name *.gcda -or
-                       -name *~ -or
-                       -name libdali*.so* \)
-                       | grep -v TC | xargs rm -rf
-                       TARGET  ${DALI_TOOLKIT_PREFIX}distclean
-                       VERBATIM
-               )
-       endif()
-endif()
-
 set(scene_loader_src_files "")
 include("${scene_loader_dir}/internal/file.list")
 include("${scene_loader_dir}/public-api/file.list")