Skip to content

Commit 6abea93

Browse files
committed
ci: rf pass if warnings in the log
1 parent bffb7b3 commit 6abea93

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

.gitlab/ci/e2e.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
LOG_LEVEL: "info"
2727
MARKERS: ""
2828
ARGS: ""
29-
FORCE_DOWNLOAD: "false"
29+
FORCE_DOWNLOAD: "false" # Download only failed tests by default
3030
PCAP: "" # Disabled by default
31+
FAIL_IF_INTERNAL_ERRORS: "true" # Enabled by default
3132
tags:
3233
- on-prem-amd64
3334
extends:
@@ -48,6 +49,7 @@
4849
export RETINA_LOGLEVEL="$LOG_LEVEL"
4950
export RETINA_FORCE_DOWNLOAD_REPORT="$FORCE_DOWNLOAD"
5051
export RETINA_PCAP_ENABLE="$PCAP"
52+
export RETINA_FAIL_IF_INTERNAL_ERRORS="$FAIL_IF_INTERNAL_ERRORS"
5153
- retina-launcher --retina-request ${REQUEST} --self-contained-html --html=./log/report.html --junitxml=out.xml "${ARGS}" -m "${MARKERS}" .
5254
after_script:
5355
- |
@@ -125,6 +127,7 @@ rf:
125127
REQUEST: "${CI_PROJECT_DIR}/.gitlab/ci/retina_request_rf.yml"
126128
MARKERS: "rf and not tcp and not multiue"
127129
LOG_LEVEL: "warning"
130+
FAIL_IF_INTERNAL_ERRORS: ""
128131
needs:
129132
- job: "avx2 [basic]"
130133
artifacts: true

tests/e2e/tests/utils.py

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def get_ue_gnb_epc(self, extra, band, common_scs, bandwidth, mcs, ue_count):
5050
"bandwidth": bandwidth,
5151
"mcs": mcs,
5252
"log_level": get_loglevel(),
53-
"pcap": bool(os.environ["RETINA_PCAP_ENABLE"])
53+
"pcap": get_pcap(),
5454
}
5555
},
5656
}
@@ -74,19 +74,24 @@ def get_ue_gnb_epc(self, extra, band, common_scs, bandwidth, mcs, ue_count):
7474

7575
with suppress(NameError, grpc._channel._InactiveRpcError):
7676
return_code = gnb.Stop(Empty()).value
77-
teardown_ok &= return_code == 0
7877
if return_code < 0:
78+
teardown_ok = False
7979
logging.error("GNB crashed with exit code %s", return_code)
8080
elif return_code > 0:
81+
if get_fail_if_internal_errors():
82+
teardown_ok = False
8183
logging.error("GNB has %d errors or warnings", return_code)
8284
with suppress(NameError, grpc._channel._InactiveRpcError):
8385
epc.Stop(Empty()).value
8486
with suppress(NameError, grpc._channel._InactiveRpcError):
8587
return_code = ue.Stop(Empty()).value
8688
teardown_ok &= return_code == 0
8789
if return_code < 0:
90+
teardown_ok = False
8891
logging.error("UE crashed with exit code %s", return_code)
8992
elif return_code > 0:
93+
if get_fail_if_internal_errors():
94+
teardown_ok = False
9095
logging.error("UE has %d errors or warnings", return_code)
9196
if teardown_ok is False:
9297
test_successful = False
@@ -147,3 +152,23 @@ def get_loglevel():
147152
return os.environ["RETINA_LOGLEVEL"]
148153
except KeyError:
149154
return "info"
155+
156+
157+
def get_pcap():
158+
"""
159+
Return True / False
160+
"""
161+
try:
162+
return bool(os.environ["RETINA_PCAP_ENABLE"])
163+
except KeyError:
164+
return False
165+
166+
167+
def get_fail_if_internal_errors():
168+
"""
169+
Return True / False
170+
"""
171+
try:
172+
return bool(os.environ["RETINA_FAIL_IF_INTERNAL_ERRORS"])
173+
except KeyError:
174+
return True

0 commit comments

Comments
 (0)