Skip to content

Commit ea9c5ce

Browse files
authored
Merge pull request #177 from aidangarske/tnftp-workflow
tnftp.yml - Github CI Workflow
2 parents aea022a + 98c771a commit ea9c5ce

11 files changed

Lines changed: 124 additions & 26 deletions

File tree

.github/scripts/check-workflow-result.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ fi
4242
if [ "$WOLFPROV_FORCE_FAIL" = "WOLFPROV_FORCE_FAIL=1" ]; then
4343
# ----- CURL -----
4444
if [ "$TEST_SUITE" = "curl" ]; then
45-
if [ -f "tests/test.log" ]; then
45+
if [ -f "curl-test.log" ]; then
4646
# Extract and clean the failed test list from the log
47-
ACTUAL_FAILS=$(grep -a '^TESTFAIL: These test cases failed:' tests/test.log | sed 's/.*failed: //')
47+
ACTUAL_FAILS=$(grep -a '^TESTFAIL: These test cases failed:' curl-test.log | sed 's/.*failed: //')
4848
else
49-
echo "Error: tests/test.log not found"
49+
echo "Error: curl-test.log not found"
5050
exit 1
5151
fi
5252

@@ -188,17 +188,17 @@ if [ "$WOLFPROV_FORCE_FAIL" = "WOLFPROV_FORCE_FAIL=1" ]; then
188188
fi
189189
# ----- NET-SNMP -----
190190
elif [ "$TEST_SUITE" = "net-snmp" ]; then
191-
if [ -f "tests/test.log" ]; then
191+
if [ -f "net-snmp-test.log" ]; then
192192
# Check if we have exactly 29 failed tests and a FAIL result
193-
if grep -q "We failed these 29 tests:" tests/test.log && grep -q "Result: FAIL" tests/test.log; then
193+
if grep -q "We failed these 29 tests:" net-snmp-test.log && grep -q "Result: FAIL" net-snmp-test.log; then
194194
echo "PASS: net-snmp tests failed as expected with force fail enabled"
195195
exit 0
196196
else
197197
echo "FAIL: net-snmp tests unexpectedly succeeded with force fail enabled"
198198
exit 1
199199
fi
200200
else
201-
echo "Error: tests/test.log not found"
201+
echo "Error: tests/net-snmp-test.log not found"
202202
exit 1
203203
fi
204204
# ----- NGINX -----
@@ -218,9 +218,9 @@ if [ "$WOLFPROV_FORCE_FAIL" = "WOLFPROV_FORCE_FAIL=1" ]; then
218218
fi
219219
# ----- STUNNEL -----
220220
elif [ "$TEST_SUITE" = "stunnel" ]; then
221-
if [ -f "$GITHUB_WORKSPACE/tests/stunnel-test.log" ]; then
221+
if [ -f "stunnel-test.log" ]; then
222222
# Check for expected error patterns
223-
if grep -q "failed: 41" "$GITHUB_WORKSPACE/tests/stunnel-test.log"; then
223+
if grep -q "failed: 41" "stunnel-test.log"; then
224224
echo "PASS: stunnel tests failed as expected with force fail enabled"
225225
exit 0
226226
else

.github/workflows/curl.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
uses: actions/checkout@v4
4343
with:
4444
fetch-depth: 1
45-
45+
4646
- name: Retrieving wolfSSL/wolfProvider from cache
4747
uses: actions/cache/restore@v4
4848
id: wolfprov-cache
@@ -88,7 +88,6 @@ jobs:
8888
export CURL_REF=${{ matrix.curl_ref }}
8989
9090
# Run tests and save output to test.log
91-
mkdir -p tests
92-
make -j$(nproc) test-ci 2>&1 | tee tests/test.log
91+
make -j$(nproc) test-ci 2>&1 | tee curl-test.log
9392
TEST_RESULT=$?
9493
$GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} curl

.github/workflows/grpc.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
uses: actions/checkout@v4
4747
with:
4848
fetch-depth: 1
49-
49+
5050
- name: Retrieving wolfSSL/wolfProvider from cache
5151
uses: actions/cache/restore@v4
5252
id: wolfprov-cache
@@ -88,7 +88,6 @@ jobs:
8888
run: |
8989
# Set up the environment for wolfProvider
9090
source $GITHUB_WORKSPACE/scripts/env-setup
91-
export ${{ matrix.force_fail }}
9291
9392
# Initialize submodules
9493
git submodule update --init

.github/workflows/ipmitool.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ jobs:
7373
run: |
7474
# Set up the environment for wolfProvider
7575
source $GITHUB_WORKSPACE/scripts/env-setup
76-
export ${{ matrix.force_fail }}
7776
7877
# Verify ipmitool was built and linked correctly with OpenSSL
7978
ldd src/ipmitool | grep -E '(libssl|libcrypto)'

.github/workflows/net-snmp.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ jobs:
8282
export ${{ matrix.force_fail }}
8383
8484
autoconf --version | grep -P '2\.\d\d' -o > dist/autoconf-version
85-
mkdir -p tests
86-
make -j test TESTOPTS="-e agentxperl" | tee tests/test.log
85+
make -j test TESTOPTS="-e agentxperl" | tee net-snmp-test.log
8786
TEST_RESULT=$?
8887
$GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} net-snmp

.github/workflows/openldap.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ jobs:
7171
run: |
7272
# Set up the environment for wolfProvider
7373
source $GITHUB_WORKSPACE/scripts/env-setup
74-
export ${{ matrix.force_fail }}
7574
7675
# Generate configure script
7776
rm -f aclocal.m4

.github/workflows/simple.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
openssl_ref: [ 'master', 'openssl-3.5.0' ]
2323
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
2424
force_fail: ['WOLFPROV_FORCE_FAIL=1', '']
25-
2625
steps:
2726
- name: Checkout wolfProvider
2827
uses: actions/checkout@v4

.github/workflows/socat.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ jobs:
7474
run: |
7575
# Set up the environment for wolfProvider
7676
source $GITHUB_WORKSPACE/scripts/env-setup
77-
export ${{ matrix.force_fail }}
7877
7978
# Verify OpenSSL loads wolfProvider
8079
$GITHUB_WORKSPACE/openssl-install/bin/openssl list -providers

.github/workflows/stunnel.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ jobs:
9494
./src/stunnel -version
9595
9696
# Run tests and capture output
97-
mkdir -p $GITHUB_WORKSPACE/tests
98-
make check 2>&1 | tee $GITHUB_WORKSPACE/tests/stunnel-test.log
97+
make check 2>&1 | tee stunnel-test.log
9998
TEST_RESULT=$?
10099
$GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} stunnel

.github/workflows/tcpdump.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,13 @@ jobs:
2626
timeout-minutes: 15
2727
strategy:
2828
matrix:
29+
tcpdump_ref: [ 'master', 'tcpdump-4.99.3' ]
2930
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
3031
openssl_ref: [ 'openssl-3.5.0' ]
31-
tcpdump_ref: [ 'master', 'tcpdump-4.99.3' ]
3232
force_fail: [ 'WOLFPROV_FORCE_FAIL=1', '' ]
3333
exclude:
3434
- tcpdump_ref: 'master'
3535
force_fail: 'WOLFPROV_FORCE_FAIL=1'
36-
3736
steps:
3837
- name: Checkout wolfProvider
3938
uses: actions/checkout@v4
@@ -98,14 +97,14 @@ jobs:
9897
# Set up the environment for wolfProvider
9998
source $GITHUB_WORKSPACE/scripts/env-setup
10099
export ${{ matrix.force_fail }}
101-
100+
102101
# Run tests
103102
make check 2>&1 | tee tcpdump-test.log
104103
TEST_RESULT=$?
105-
104+
106105
if [ $TEST_RESULT -ne 0 ]; then
107106
grep -A2 -B2 "exit code\|failed\|FAILED" tcpdump-test.log || true
108107
fi
109-
108+
110109
$GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} tcpdump
111110

0 commit comments

Comments
 (0)