2929
3030 env :
3131 MULTI_SERVER_ENV_DOCKER_BUILD_OS : ubuntu24
32- MULTI_SERVER_TEST_RESULTS_LOG : build/tests/multi-server/freeradius-multi-server-test-runtime-logs/multi-server-test-results-combined .log
33- MULTI_SERVER_TEST_LISTENER_LOG : build/tests/multi-server/freeradius-multi-server-test-runtime-logs/multi-server-test-listener-combined .log
32+ MULTI_SERVER_TEST_LOG : build/tests/multi-server/freeradius-multi-server-test-runtime-logs/multi-server-test.log
33+ MULTI_SERVER_TEST_LISTENER_LOG : build/tests/multi-server/freeradius-multi-server-test-runtime-logs/multi-server-test-linelog-msg-output .log
3434
3535 steps :
3636 # Checkout, but defer pulling LFS objects until we've restored the cache
@@ -98,30 +98,25 @@ jobs:
9898 run : |
9999 set -euo pipefail
100100
101- echo "============ ${MULTI_SERVER_TEST_RESULTS_LOG} ============"
102- cat "${MULTI_SERVER_TEST_RESULTS_LOG}"
103-
104- if grep -q '\[Failed\]' "${MULTI_SERVER_TEST_RESULTS_LOG}"; then
105- echo "TEST FAILED: Found [Failed] in log"
106- grep '\[Failed\]' "${MULTI_SERVER_TEST_RESULTS_LOG}"
107-
108- # Display the framework's listener log for debugging purposes
109- echo "============ ${MULTI_SERVER_TEST_LISTENER_LOG} ============"
110- cat "${MULTI_SERVER_TEST_LISTENER_LOG}"
111- exit 1
112- fi
101+ echo "${MULTI_SERVER_TEST_LOG}:"
102+ cat "${MULTI_SERVER_TEST_LOG}"
113103
114- if grep -Eq '\(Failures:[[:space:]]*[1-9][0-9]*[[:space:]]*\)' "${MULTI_SERVER_TEST_RESULTS_LOG}"; then
115- echo "TEST FAILED: Found Failures > 0 in log"
116- grep -E '\(Failures:[[:space:]]*[1-9][0-9]*[[:space:]]*\)' "${MULTI_SERVER_TEST_RESULTS_LOG}"
104+ if grep -Eq "\(Failures:[^0-9]*[1-9][0-9]*\)" "${MULTI_SERVER_TEST_LOG}"; then
105+ echo "TEST FAILED: Found > 0 failures in log"
117106
118- # Display the framework 's listener log for debugging purposes
119- echo "============ ${MULTI_SERVER_TEST_LISTENER_LOG} ============ "
107+ # Display the test 's linelog message file
108+ echo "${MULTI_SERVER_TEST_LISTENER_LOG}: "
120109 cat "${MULTI_SERVER_TEST_LISTENER_LOG}"
121110 exit 1
122111 fi
123112
124- log="${MULTI_SERVER_TEST_RESULTS_LOG}"
113+ # Verify that all of the expected linelog results were matched
114+ # during the test(s).
115+ #
116+ # Checking to see that the <actual> value matches <expected> value in lines like:
117+ #
118+ # Matched: <actual> / <expected> (Failures: 0)
119+ #
125120 if awk '
126121 BEGIN { found=0; n1=0; n2=0; line="" }
127122 index($0,"Matched:") {
@@ -141,13 +136,13 @@ jobs:
141136 if (found) { printf "MATCH: %d / %d\nMatched line: %s\n", n1, n2, line; exit 0 }
142137 exit 1
143138 }
144- ' "$log "
139+ ' "${MULTI_SERVER_TEST_LOG} "
145140 then
146141 : # PASS
147142 else
148- echo "TEST FAILED: No Matched line found with equal non-zero counts "
149- # Display the framework 's listener log for debugging purposes
150- echo "============ ${MULTI_SERVER_TEST_LISTENER_LOG} ============ "
143+ echo "TEST FAILED: Detected issues with the test's linelog message logs "
144+ # Display the test 's linelog message file
145+ echo "${MULTI_SERVER_TEST_LISTENER_LOG}: "
151146 cat "${MULTI_SERVER_TEST_LISTENER_LOG}"
152147 exit 1
153148 fi
0 commit comments