|
1 | 1 | #!/usr/bin/env bash |
2 | 2 | set -e |
3 | 3 |
|
4 | | -echo "🧪 Generating coverage for oo7::native_crypto/tokio..." |
5 | | -mkdir -p coverage-raw |
6 | | -cargo tarpaulin \ |
7 | | - --package oo7 \ |
8 | | - --no-default-features \ |
9 | | - --features "tracing,tokio,native_crypto" \ |
10 | | - --ignore-panics \ |
11 | | - --out Lcov \ |
12 | | - --output-dir coverage-raw |
13 | | -mv coverage-raw/lcov.info coverage-raw/native-tokio.info |
| 4 | +# Crypto features to test |
| 5 | +CRYPTO_FEATURES=("native_crypto" "openssl_crypto") |
| 6 | +PROMPTERS=("gnome" "plasma") |
14 | 7 |
|
15 | | -echo "" |
16 | | -echo "🧪 Generating coverage for oo7::openssl_crypto/tokio..." |
17 | | -cargo tarpaulin \ |
18 | | - --package oo7 \ |
19 | | - --no-default-features \ |
20 | | - --features "tracing,tokio,openssl_crypto" \ |
21 | | - --ignore-panics \ |
22 | | - --out Lcov \ |
23 | | - --output-dir coverage-raw |
24 | | -mv coverage-raw/lcov.info coverage-raw/openssl-tokio.info |
| 8 | +mkdir -p coverage-raw |
25 | 9 |
|
26 | | -echo "" |
27 | | -echo "🧪 Generating coverage for oo7-daemon::native_crypto..." |
28 | | -cargo tarpaulin \ |
29 | | - --package oo7-daemon \ |
30 | | - --no-default-features \ |
31 | | - --features "native_crypto" \ |
32 | | - --ignore-panics \ |
33 | | - --out Lcov \ |
34 | | - --output-dir coverage-raw |
35 | | -mv coverage-raw/lcov.info coverage-raw/daemon-native_crypto.info |
| 10 | +# Test oo7 package with all crypto features |
| 11 | +for crypto in "${CRYPTO_FEATURES[@]}"; do |
| 12 | + echo "🧪 Generating coverage for oo7::${crypto}/tokio..." |
| 13 | + cargo tarpaulin \ |
| 14 | + --package oo7 \ |
| 15 | + --no-default-features \ |
| 16 | + --features "tracing,tokio,${crypto}" \ |
| 17 | + --ignore-panics \ |
| 18 | + --out Lcov \ |
| 19 | + --output-dir coverage-raw |
| 20 | + mv coverage-raw/lcov.info "coverage-raw/${crypto}-tokio.info" |
| 21 | + echo "" |
| 22 | +done |
36 | 23 |
|
37 | | -echo "" |
38 | | -echo "🧪 Generating coverage for oo7-daemon::openssl_crypto..." |
39 | | -cargo tarpaulin \ |
40 | | - --package oo7-daemon \ |
41 | | - --no-default-features \ |
42 | | - --features "openssl_crypto" \ |
43 | | - --ignore-panics \ |
44 | | - --out Lcov \ |
45 | | - --output-dir coverage-raw |
46 | | -mv coverage-raw/lcov.info coverage-raw/daemon-openssl_crypto.info |
| 24 | +# Test daemon with all prompter/crypto combinations |
| 25 | +for prompter in "${PROMPTERS[@]}"; do |
| 26 | + for crypto in "${CRYPTO_FEATURES[@]}"; do |
| 27 | + echo "" |
| 28 | + echo "🧪 Generating coverage for oo7-daemon::${prompter}_${crypto}..." |
| 29 | + OO7_DAEMON_PROMPTER_TEST="${prompter}" cargo tarpaulin \ |
| 30 | + --package oo7-daemon \ |
| 31 | + --no-default-features \ |
| 32 | + --features "${crypto}" \ |
| 33 | + --ignore-panics \ |
| 34 | + --out Lcov \ |
| 35 | + --output-dir coverage-raw |
| 36 | + mv coverage-raw/lcov.info "coverage-raw/daemon-${prompter}_${crypto}.info" |
| 37 | + done |
| 38 | +done |
47 | 39 |
|
48 | 40 | echo "" |
49 | 41 | echo "📊 Merging coverage reports..." |
|
0 commit comments