From cce302d057f257a1b793e48ea2dfb40f2d3c4d4c Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Wed, 31 Mar 2021 19:53:22 +0100 Subject: [PATCH] (Coverage) Remove system & third-party files, fix path shown in html - 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 | 4 +- build/tizen/CMakeLists.txt | 4 +- build/tizen/dali-scene-loader/CMakeLists.txt | 57 ---------------------------- 3 files changed, 4 insertions(+), 61 deletions(-) diff --git a/automated-tests/coverage.sh b/automated-tests/coverage.sh index 96c3740..11c534d 100755 --- a/automated-tests/coverage.sh +++ b/automated-tests/coverage.sh @@ -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 ) diff --git a/build/tizen/CMakeLists.txt b/build/tizen/CMakeLists.txt index a7bc0e6..8be2625 100644 --- a/build/tizen/CMakeLists.txt +++ b/build/tizen/CMakeLists.txt @@ -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` ) diff --git a/build/tizen/dali-scene-loader/CMakeLists.txt b/build/tizen/dali-scene-loader/CMakeLists.txt index d3ebe7d..ae7fea2 100644 --- a/build/tizen/dali-scene-loader/CMakeLists.txt +++ b/build/tizen/dali-scene-loader/CMakeLists.txt @@ -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 $ ) - 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") -- 2.7.4