Skip to content

Commit f34f65f

Browse files
committed
Run latest bbt to get a xunit test results and upload it to codecov.io
1 parent 2fa345b commit f34f65f

5 files changed

Lines changed: 17 additions & 5 deletions

File tree

.github/workflows/main.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ jobs:
5656

5757
# Install binary crates needed for testing
5858
- name: Install binary crates
59-
run: alr --non-interactive install bbt~0.2.0
59+
run: |
60+
git clone --depth 1 https://github.com/LionelDraghi/bbt.git
61+
alr --non-interactive -C bbt install
6062
shell: bash
6163

6264
# Run the instrumented testsuite. This will produce *.gcno and *.gcda files for the coverage analysis.
@@ -116,9 +118,17 @@ jobs:
116118

117119
# Upload results to codecov.io
118120
- if: runner.os == 'Linux'
121+
name: Upload coverage to Codecov
119122
uses: codecov/codecov-action@v5
120123
with:
121124
fail_ci_if_error: true # optional (default = false)
122125
name: codecov-umbrella # optional
123126
token: ${{ secrets.CODECOV_TOKEN }}
124127
verbose: true # optional (default = false)
128+
- name: Upload test results to Codecov
129+
if: ${{ !cancelled() }}
130+
uses: codecov/codecov-action@v5
131+
with:
132+
files: server/tests/coap_results.xml, server/tests/coaps_results.xml, client/tests/coap_results.xml, client/tests/coaps_results.xml
133+
token: ${{ secrets.CODECOV_TOKEN }}
134+
report_type: test_results

client/tests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
*.md.out
2+
*_results.xml

client/tests/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ all: $(RESULTS)
1313
.PHONY: all
1414

1515
coap_results.md : coap_client_tests.md $(PROGRAM)
16-
bbt --verbose $< > $@
16+
bbt --verbose --junit coap_results.xml $< > $@
1717
grep -F 'Summary : **Success**' $@
1818

1919
coaps_results.md: coaps_client_tests.md $(PROGRAM)
2020
coap-server-openssl -k COAP_SPARK_KEY_5684 -u coap_spark -d 100 &
21-
bbt --verbose $< > $@
21+
bbt --verbose --junit coaps_results.xml $< > $@
2222
grep -F 'Summary : **Success**' $@
2323
pkill -f coap-server-openssl
2424

server/tests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
*.md.out
2+
*_results.xml

server/tests/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ coap_results.md : coap_server_tests.md $(PROGRAM)
2727
$(PROGRAM) -v 4 & \
2828
SERVER_PID=$$!; \
2929
trap 'sleep 2; kill $$SERVER_PID >/dev/null 2>&1 || true' EXIT; \
30-
bbt --keep-going --verbose $< > $@; \
30+
bbt --keep-going --verbose --junit coap_results.xml $< > $@; \
3131
grep -F 'Summary : **Success**' $@; \
3232
coap_client -m fetch coap://localhost/
3333

@@ -36,7 +36,7 @@ coaps_results.md: coaps_server_tests.md $(PROGRAM)
3636
$(PROGRAM) -v 4 $(SECURE_ARGS) & \
3737
SERVER_PID=$$!; \
3838
trap 'sleep 2; kill $$SERVER_PID >/dev/null 2>&1 || true' EXIT; \
39-
bbt --keep-going --verbose $< > $@; \
39+
bbt --keep-going --verbose --junit coaps_results.xml $< > $@; \
4040
grep -F 'Summary : **Success**' $@; \
4141
coap_client -m fetch $(SECURE_ARGS) coaps://localhost/
4242

0 commit comments

Comments
 (0)