File tree 2 files changed +35
-0
lines changed
2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 60
60
runs-on : ubuntu-latest
61
61
timeout-minutes : 15
62
62
env :
63
+ SUDO_TEST_PROFRAW_DIR : /tmp/profraw
63
64
SUDO_TEST_VERBOSE_DOCKER_BUILD : 1
64
65
CI : true
65
66
steps :
94
95
SUDO_UNDER_TEST : ours
95
96
run : cargo test -p sudo-compliance-tests
96
97
98
+ - name : Prepare code coverage data
99
+ run : ./make-lcov-info.bash
100
+
101
+ - name : Upload code coverage
102
+ uses : codecov/codecov-action@v3
103
+ with :
104
+ files : lcov.info
105
+
97
106
- name : Check that we didn't forget to gate a passing compliance test
98
107
working-directory : test-framework
99
108
env :
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -euo pipefail
4
+
5
+ rustup component add llvm-tools
6
+
7
+ llvm_profdata=$( find " $( rustc --print sysroot) " -name llvm-profdata)
8
+ profdata=" $SUDO_TEST_PROFRAW_DIR " /sudo-rs.profdata
9
+ $llvm_profdata merge \
10
+ -sparse \
11
+ " $SUDO_TEST_PROFRAW_DIR " /** /* .profraw \
12
+ -o " $profdata "
13
+
14
+ binary=" $SUDO_TEST_PROFRAW_DIR " /sudo-rs
15
+ dockerid=$( docker create sudo-test-rs)
16
+ docker cp " $dockerid " :/usr/bin/sudo " $binary "
17
+ docker rm " $dockerid "
18
+
19
+ llvm_cov=" $( dirname " $llvm_profdata " ) " /llvm-cov
20
+ $llvm_cov export \
21
+ -format=lcov \
22
+ --ignore-filename-regex=' /usr/local/cargo/registry' \
23
+ --ignore-filename-regex=' /rustc' \
24
+ --instr-profile=" $profdata " \
25
+ --object " $binary " \
26
+ -path-equivalence=/usr/src/sudo," $( pwd) " > lcov.info
You can’t perform that action at this time.
0 commit comments