aboutsummaryrefslogtreecommitdiffstats
path: root/build-scripts/test-coverage
diff options
context:
space:
mode:
Diffstat (limited to 'build-scripts/test-coverage')
-rwxr-xr-xbuild-scripts/test-coverage15
1 files changed, 15 insertions, 0 deletions
diff --git a/build-scripts/test-coverage b/build-scripts/test-coverage
new file mode 100755
index 00000000..fc2f2fbd
--- /dev/null
+++ b/build-scripts/test-coverage
@@ -0,0 +1,15 @@
+#!/bin/bash
+set -e
+sudo apt-get update
+sudo apt-get -y install \
+ build-essential cmake lcov \
+ zlib1g-dev libjpeg-dev libgnutls28-dev libssl-dev
+cmake -S . -B build \
+ -DCI_MODE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Debug \
+ -DREQUIRE_CRYPTO_OPENSSL=1 -DREQUIRE_CRYPTO_GNUTLS=1 \
+ -DENABLE_QTC=1 -DENABLE_COVERAGE=ON
+cmake --build build --verbose -j$(nproc) -- -k
+(cd build; ctest --verbose)
+lcov --capture --directory . --output-file coverage.info
+lcov --remove coverage.info '/usr/*' --output-file coverage.info
+lcov --list coverage.info