Skip to content

Commit 12de9ec

Browse files
chipitsinewtarreau
authored andcommitted
CI: WolfSSL: enable unit tests
Run the new make unit-tests on the CI.
1 parent 75a1e40 commit 12de9ec

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/wolfssl.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ permissions:
1111
jobs:
1212
test:
1313
runs-on: ubuntu-latest
14+
if: ${{ github.repository_owner == 'haproxy' || github.event_name == 'workflow_dispatch' }}
1415
steps:
1516
- uses: actions/checkout@v4
1617
- name: Install VTest
@@ -19,15 +20,15 @@ jobs:
1920
- name: Install apt dependencies
2021
run: |
2122
sudo apt-get update -o Acquire::Languages=none -o Acquire::Translation=none
22-
sudo apt-get --no-install-recommends -y install socat gdb
23+
sudo apt-get --no-install-recommends -y install socat gdb jose
2324
- name: Install WolfSSL
2425
run: env WOLFSSL_VERSION=git-master WOLFSSL_DEBUG=1 scripts/build-ssl.sh
2526
- name: Compile HAProxy
2627
run: |
2728
make -j$(nproc) ERR=1 CC=gcc TARGET=linux-glibc \
2829
USE_OPENSSL_WOLFSSL=1 USE_QUIC=1 \
2930
SSL_LIB=${HOME}/opt/lib SSL_INC=${HOME}/opt/include \
30-
DEBUG="-DDEBUG_POOL_INTEGRITY" \
31+
DEBUG="-DDEBUG_POOL_INTEGRITY -DDEBUG_UNIT" \
3132
ADDLIB="-Wl,-rpath,/usr/local/lib/ -Wl,-rpath,$HOME/opt/lib/" \
3233
ARCH_FLAGS="-ggdb3 -fsanitize=address"
3334
sudo make install
@@ -48,6 +49,10 @@ jobs:
4849
# allow to catch coredumps
4950
ulimit -c unlimited
5051
make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
52+
- name: Run Unit tests
53+
id: unittests
54+
run: |
55+
make unit-tests
5156
- name: Show VTest results
5257
if: ${{ failure() && steps.vtest.outcome == 'failure' }}
5358
run: |
@@ -72,3 +77,13 @@ jobs:
7277
if [ "$failed" = true ]; then
7378
exit 1;
7479
fi
80+
- name: Show Unit-Tests results
81+
if: ${{ failure() && steps.unittests.outcome == 'failure' }}
82+
run: |
83+
for result in ${TMPDIR:-/tmp}/ha-unittests-*/results/res.*; do
84+
printf "::group::"
85+
cat $result
86+
echo "::endgroup::"
87+
done
88+
exit 1
89+

0 commit comments

Comments
 (0)