| 1 | utdir=build-ut |
| 2 | rm -r $utdir |
| 3 | rm -r ../$utdir |
| 4 | mkdir ../$utdir |
| 5 | cd ../$utdir |
| 6 | |
| 7 | cmake -DCMAKE_BUILD_TYPE=Release .. |
| 8 | make -j16 |
| 9 | |
| 10 | workdir=$(cd ../$(dirname $0)/$utdir; pwd) |
| 11 | |
| 12 | app_name=deepin-log-viewer-test |
| 13 | |
| 14 | mkdir -p report |
| 15 | |
| 16 | ./tests/$app_name --gtest_output=xml:./report/report.xml |
| 17 | |
| 18 | lcov -d $workdir -c -o ./report/coverage.info |
| 19 | |
| 20 | lcov --extract ./report/coverage.info '*/application/*' '*/logViewerAuth/*' '*/logViewerService/*' '*/logViewerTruncate/*' -o ./report/coverage.info |
| 21 | |
| 22 | lcov --remove ./report/coverage.info '*/tests/*' -o ./report/coverage.info |
| 23 | |
| 24 | genhtml -o ./report ./report/coverage.info |
| 25 | |
| 26 | exit 0 |