feat: 配置ci

文件命名、生成脚本

Log: 任务栏配置ci
Change-Id: I0948f79beb3348ee1dccb90bf4b4453d5c1e9c13
This commit is contained in:
liuxing 2021-03-05 10:10:26 +08:00 committed by fanpengcheng
parent 6a28c55153
commit d330600907
7 changed files with 24 additions and 1 deletions

View File

@ -90,7 +90,7 @@ file(GLOB SRC_PATH
add_subdirectory("frame")
add_subdirectory("plugins")
add_subdirectory("unittest")
add_subdirectory("tests")
# Install settings
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)

23
tests/test-recoverage.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
BUILD_DIR=build
REPORT_DIR=report
cd ../
rm -rf $BUILD_DIR
mkdir $BUILD_DIR
cd $BUILD_DIR
cmake ../
make
cd tests/
lcov -c -i -d ./ -o init.info
./dde_dock_unit_test
lcov -c -d ./ -o cover.info
lcov -a init.info -a cover.info -o total.info
lcov -r total.info "*/tests/*" "*/usr/include*" "*build/src*" -o final.info
rm -rf ../../tests/$REPORT_DIR
mkdir -p ../../tests/$REPORT_DIR
genhtml -o ../../tests/$REPORT_DIR final.info