-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrun-coverage.sh
More file actions
46 lines (38 loc) · 1.14 KB
/
Copy pathrun-coverage.sh
File metadata and controls
46 lines (38 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
(
cd build_debug || exit
cmake --build .
lcov --directory . --zerocounters
rm -rf coverage_html.tar.gz coverage_html
ctest --output-on-failure
lcov --capture \
--directory . \
--output-file coverage.info &> /dev/null
lcov --remove coverage.info \
'/usr/*' \
'*/_deps/*' \
'*/tests/helpers.h' \
'*/benchmark/*' \
'*/apps/*' \
'*/docs/*' \
'*/cmake/*' \
'*/.cache/*' \
-o coverage.filtered.info &> /dev/null
genhtml coverage.filtered.info \
--output-directory coverage_html \
--legend \
--title "http Code Coverage" &> /dev/null
echo "✅ Coverage HTML report generated in build_debug/coverage_html/index.html"
)
(
cd src/rust || exit
cargo llvm-cov --html
echo "✅ Coverage HTML report generated in src/rust/target/llvm-cov/html"
)
(
. .venv/bin/activate
cd src/python
python3 -m pip install --editable .[test] &> /dev/null
pytest -sv --cov=httppy --cov-report=html tests
echo "✅ Coverage HTML report generated in src/python/htmlcov/index.html"
)