9797
9898 # Build only the SSL test and its dependencies
9999 cmake --build . --target tst_qsslsocket --parallel $(nproc)
100+
101+ #disable tests that both openssl and wolfprovider fail
102+ cp $GITHUB_WORKSPACE/.github/scripts/qtbase/BLACKLIST tests/auto/network/ssl/qsslsocket/BLACKLIST
100103
101104 - name : Build Qt (v5.15.8 - qmake)
102105 if : matrix.qt_ref != 'dev'
@@ -106,7 +109,7 @@ jobs:
106109 echo 'QMAKE_CXXFLAGS += -std=c++14' >> mkspecs/linux-g++/qmake.conf
107110
108111 make -k -j$(nproc)
109-
112+
110113 - name : Add test server to hosts
111114 run : |
112115 sudo sh -c 'echo "127.0.0.1 qt-test-server.qt-test-net" >> /etc/hosts'
@@ -119,21 +122,24 @@ jobs:
119122 export ${{ matrix.force_fail }}
120123
121124 # Run the QSSLSocket test, the make check takes too long
122- ./tests/auto/network/ssl/qsslsocket/tst_qsslsocket 2>&1 | tee qsslsocket-test.log
123-
124- # Make sure it passes the same number of tests as openssl
125- if [ "${{ matrix.qt_ref }}" == "dev" ]; then
126- EXPECTED_TESTS=549
127- else
128- EXPECTED_TESTS=521
129- fi
125+ QTEST_ENVIRONMENT=ci ./tests/auto/network/ssl/qsslsocket/tst_qsslsocket 2>&1 | tee qsslsocket-test.log
130126
131- # Check test results
132- if grep -q "$EXPECTED_TESTS passed" qsslsocket-test.log; then
133- TEST_RESULT=0
127+ # Check test results based on qt_ref
128+ if [[ "${{ matrix.qt_ref }}" == "dev" ]]; then
129+ if grep -q "0 failed" qsslsocket-test.log; then
130+ TEST_RESULT=0
131+ else
132+ TEST_RESULT=1
133+ echo "Tests failed unexpectedly for 'dev' branch."
134+ fi
134135 else
135- TEST_RESULT=1
136- echo "Expected $EXPECTED_TESTS tests to pass, but results don't match expected counts"
136+ #No easy way to disable tests in v5.15.8. Both openssl and wolfprovider should always pass 521 tests on this version though
137+ if grep -q "521 passed" qsslsocket-test.log; then
138+ TEST_RESULT=0
139+ else
140+ TEST_RESULT=1
141+ echo "Tests failed unexpectedly for 'v5.15.8-lts-lgpl' branch."
142+ fi
137143 fi
138-
144+
139145 $GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} qtbase-qsslsocket
0 commit comments