|
46 | 46 | coverage: |
47 | 47 | name: Coverage |
48 | 48 | runs-on: ubuntu-latest |
49 | | - timeout-minutes: 30 |
| 49 | + timeout-minutes: 45 |
50 | 50 | needs: build_wolfssl |
51 | 51 | steps: |
52 | 52 | - name: Checkout wolfSSH |
@@ -87,20 +87,37 @@ jobs: |
87 | 87 | LLVM_PROFILE_FILE="$PWD/prof/%p-%m.profraw" \ |
88 | 88 | timeout -k 30 1200 make check |
89 | 89 |
|
| 90 | + # 'make check' does not execute wolfsshd, so run it separately |
| 91 | + - name: Run wolfSSHd tests |
| 92 | + working-directory: ./apps/wolfsshd/test |
| 93 | + run: | |
| 94 | + prof="$GITHUB_WORKSPACE/prof/%p-%m.profraw" |
| 95 | + sudo LLVM_PROFILE_FILE="$prof" SSHD_ENV="LLVM_PROFILE_FILE=$prof" \ |
| 96 | + ./run_all_sshd_tests.sh |
| 97 | + sudo chown -R "$(id -u):$(id -g)" "$GITHUB_WORKSPACE/prof" |
| 98 | +
|
90 | 99 | - name: Report coverage |
91 | 100 | run: | |
92 | 101 | llvm-profdata-18 merge -sparse prof/*.profraw -o wolfssh.profdata |
93 | 102 | # llvm-cov takes one binary positionally and the rest via -object. |
94 | | - # Tests linking the shared library are libtool wrapper scripts, so |
95 | | - # take the real binary from .libs when one is there. |
| 103 | + # Programs linking the shared library are libtool wrapper scripts, so |
| 104 | + # take the real binary from .libs when one is there. The apps are |
| 105 | + # optional, so skip whatever this configuration did not build. |
96 | 106 | first="" |
97 | 107 | args=() |
98 | | - for t in tests/*.test; do |
99 | | - real="tests/.libs/$(basename "$t")" |
| 108 | + for t in tests/*.test apps/wolfssh/wolfssh apps/wolfsshd/wolfsshd \ |
| 109 | + apps/wolfsshd/test/test_configuration; do |
| 110 | + [ -e "$t" ] || continue |
| 111 | + real="$(dirname "$t")/.libs/$(basename "$t")" |
100 | 112 | [ -x "$real" ] || real="$t" |
101 | | - if [ -z "$first" ]; then first="$real"; else args+=(-object "$real"); fi |
| 113 | + if [ -z "$first" ]; then |
| 114 | + first="$real" |
| 115 | + else |
| 116 | + args+=(-object "$real") |
| 117 | + fi |
102 | 118 | done |
103 | | - ignore='(tests|examples|apps)/.*|.*/include/wolfssl/.*|.*/wolfssh/.*\.h' |
| 119 | + ignore='(tests|examples)/.*|apps/wolfsshd/test/.*' |
| 120 | + ignore="$ignore"'|.*/include/wolfssl/.*|.*/wolfssh/.*\.h' |
104 | 121 | llvm-cov-18 report "$first" "${args[@]}" \ |
105 | 122 | -instr-profile=wolfssh.profdata \ |
106 | 123 | --show-mcdc-summary \ |
|
0 commit comments