diff --git a/ci-scripts/cls_oai_html.py b/ci-scripts/cls_oai_html.py index 478cbd1860..c90b01a338 100644 --- a/ci-scripts/cls_oai_html.py +++ b/ci-scripts/cls_oai_html.py @@ -224,7 +224,6 @@ class HTMLManagement(): self.htmlFile.write(' \n') self.htmlFile.write(' \n') self.htmlFile.close() - time.sleep(1) if passStatus: cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__//' test_results.html" subprocess.run(cmd, shell=True) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 4d7cf0a6fd..53bdacaacc 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -213,7 +213,7 @@ def Iperf_analyzeV2UDP(server_filename, iperf_bitrate_threshold, iperf_packetlos pal_msg += f' (too high! >{iperf_packetloss_threshold}%)' return (result, f'{req_msg}\n{bir_msg}\n{brl_msg}\n{jit_msg}\n{pal_msg}') -def Custom_Command(HTML, node, command, command_fail): +def Custom_Command(HTML, node, command): logging.info(f"Executing custom command on {node}") cmd = cls_cmd.getConnection(node) ret = cmd.run(command) @@ -221,26 +221,20 @@ def Custom_Command(HTML, node, command, command_fail): logging.debug(f"Custom_Command: {command} on node: {node} - {'OK, command succeeded' if ret.returncode == 0 else f'Error, return code: {ret.returncode}'}") status = 'OK' message = [] - if ret.returncode != 0 and not command_fail: - message = [ret.stdout] - logging.warning(f'Custom_Command output: {message}') - status = 'Warning' - if ret.returncode != 0 and command_fail: + if ret.returncode != 0: message = [ret.stdout] logging.error(f'Custom_Command failed: output: {message}') status = 'KO' HTML.CreateHtmlTestRowQueue(command, status, message) return status == 'OK' or status == 'Warning' -def Custom_Script(HTML, node, script, command_fail): +def Custom_Script(HTML, node, script): logging.info(f"Executing custom script on {node}") ret = cls_cmd.runScript(node, script, 90) logging.debug(f"Custom_Script: {script} on node: {node} - return code {ret.returncode}, output:\n{ret.stdout}") status = 'OK' message = [ret.stdout] - if ret.returncode != 0 and not command_fail: - status = 'Warning' - if ret.returncode != 0 and command_fail: + if ret.returncode != 0: status = 'KO' HTML.CreateHtmlTestRowQueue(script, status, message) return status == 'OK' or status == 'Warning' diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 333d515858..18956ae28f 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -376,14 +376,12 @@ def ExecuteActionWithParam(action): # Change all execution targets to localhost node = 'localhost' command = test.findtext('command') - command_fail = test.findtext('command_fail') in ['True', 'true', 'Yes', 'yes'] - success = cls_oaicitest.Custom_Command(HTML, node, command, command_fail) + success = cls_oaicitest.Custom_Command(HTML, node, command) elif action == 'Custom_Script': node = test.findtext('node') script = test.findtext('script') - command_fail = test.findtext('command_fail') in ['True', 'true', 'Yes', 'yes'] - success = cls_oaicitest.Custom_Script(HTML, node, script, command_fail) + success = cls_oaicitest.Custom_Script(HTML, node, script) elif action == 'Pull_Cluster_Image': tag_prefix = test.findtext('tag_prefix') or "" @@ -626,6 +624,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re HTML.testCase_id=CiTestObj.testCase_id CiTestObj.desc = test.findtext('desc') always_exec = test.findtext('always_exec') in ['True', 'true', 'Yes', 'yes'] + may_fail = test.findtext('may_fail') in ['True', 'true', 'Yes', 'yes'] HTML.desc=CiTestObj.desc action = test.findtext('class') if (CheckClassValidity(xml_class_list, action, id) == False): @@ -639,7 +638,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re break try: test_succeeded = ExecuteActionWithParam(action) - if not test_succeeded: + if not test_succeeded and may_fail: + logging.warning(f"test ID {test_case_id} action {action} may or may not fail, proceeding despite error") + elif not test_succeeded: logging.error(f"test ID {test_case_id} action {action} failed ({test_succeeded}), skipping next tests") task_set_succeeded = False except Exception as e: diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 6f58478476..f0f790ba2c 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -95,7 +95,6 @@ class RANManagement(): self.cmd_prefix = '' # prefix before {lte,nr}-softmodem self.node = '' self.command = '' - self.command_fail = False #----------------------------------------------------------- diff --git a/ci-scripts/tests/test-runner/test.xml b/ci-scripts/tests/test-runner/test.xml index d5efacfdae..cb54989301 100644 --- a/ci-scripts/tests/test-runner/test.xml +++ b/ci-scripts/tests/test-runner/test.xml @@ -27,6 +27,8 @@ wrench 000001 + 000011 + 000012 000002 000003 000004 @@ -38,7 +40,21 @@ This should succeed localhost true - yes + + + + Custom_Command + This may fail + true + localhost + false + + + + Custom_Command + This is still executed + localhost + true @@ -46,7 +62,6 @@ This should fail localhost false - yes @@ -54,7 +69,6 @@ This should be skipped localhost true - yes @@ -63,6 +77,5 @@ true localhost true - yes diff --git a/ci-scripts/xml_files/container_5g_f1_rfsim.xml b/ci-scripts/xml_files/container_5g_f1_rfsim.xml index b27b0b5701..3b783a9215 100644 --- a/ci-scripts/xml_files/container_5g_f1_rfsim.xml +++ b/ci-scripts/xml_files/container_5g_f1_rfsim.xml @@ -134,7 +134,6 @@ Simulate a DL radio channel with noise (3 dB) cacofonix echo channelmod modify 0 noise_power_dB 3 | nc --send-only 192.168.71.181 8091 - yes @@ -166,7 +165,6 @@ Trigger Reestablishment cacofonix echo ci force_reestab | nc 192.168.71.171 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment' - yes @@ -185,7 +183,6 @@ Verify Reestablishment cacofonix echo ci get_reestab_count | nc 192.168.71.150 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1' - yes @@ -193,7 +190,6 @@ Simulate a disruption of DL radio channel (ploss 55) cacofonix echo channelmod modify 0 ploss 55 | nc 192.168.71.181 8091 - yes @@ -201,7 +197,6 @@ Get UE sync state (UE ID 0) cacofonix echo ciUE sync_state 0 | nc 192.168.71.181 8091 | grep -E UE_NOT_SYNC - yes @@ -209,7 +204,6 @@ Restoration of the original DL channel conditions (ploss 20) cacofonix echo channelmod modify 0 ploss 20 | nc 192.168.71.181 8091 - yes @@ -217,7 +211,6 @@ Get UE sync state (UE ID 0) cacofonix echo ciUE sync_state 0 | nc 192.168.71.181 8091 | grep -E UE_CONNECTED - yes @@ -225,7 +218,6 @@ Trigger Handover cacofonix echo ci trigger_f1_ho | nc 192.168.71.150 9090 - yes @@ -233,7 +225,6 @@ UE (1) connected to DU-PCI 0? cacofonix echo ci fetch_du_by_ue_id 1 | nc 192.168.71.150 9090 | grep "3584" - yes @@ -241,7 +232,6 @@ UE (1) connected to DU-PCI 1? cacofonix echo ci fetch_du_by_ue_id 1 | nc 192.168.71.150 9090 | grep "3585" - yes diff --git a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml index 5a59880b2f..91275a5f10 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_24prb.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_24prb.xml @@ -151,7 +151,6 @@ Force Msg3 C-RNTI RA cacofonix echo ciUE force_crnti_ra | nc 192.168.71.150 8091 - yes @@ -159,7 +158,6 @@ Force RRC_IDLE (UE ID 0) cacofonix echo ciUE force_RRC_IDLE | nc 192.168.71.150 8091 - yes diff --git a/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml b/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml index 133d960c3a..ac7e28f003 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_sidelink.xml @@ -79,7 +79,6 @@ Check that UE synched cacofonix docker logs rfsim5g-oai-nr-ue-2 | grep -m 1 "PSBCH RX:OK" - yes diff --git a/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml b/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml index bf71fc98ab..34d46cc87d 100644 --- a/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml +++ b/ci-scripts/xml_files/container_5g_rfsim_tdd_dora.xml @@ -108,14 +108,6 @@ 0 - - Custom_Command - true - Clean-Up any residual volume - cacofonix - docker volume rm 5g_rfsimulator_tdd_dora_rrc.config - - Clean_Test_Server_Images true diff --git a/ci-scripts/xml_files/container_nsa_b200_quectel.xml b/ci-scripts/xml_files/container_nsa_b200_quectel.xml index 035163f3db..17c8a9b14f 100644 --- a/ci-scripts/xml_files/container_nsa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_nsa_b200_quectel.xml @@ -70,9 +70,9 @@ Custom_Command - Reset USRP + Reset USRP on nepes nepes - sudo -S /usr/lib/uhd/utils/b2xx_fx3_utils --reset-device + sudo -S /usr/local/lib/uhd/utils/b2xx_fx3_utils --reset-device diff --git a/ci-scripts/xml_files/container_sa_aw2s_asue.xml b/ci-scripts/xml_files/container_sa_aw2s_asue.xml index 7eb6411827..88ab941e31 100644 --- a/ci-scripts/xml_files/container_sa_aw2s_asue.xml +++ b/ci-scripts/xml_files/container_sa_aw2s_asue.xml @@ -182,7 +182,7 @@ Iperf - iperf (DL/3Mbps/UDP)(30 sec)(multi-ue profile) + iperf (DL/3Mbps/UDP)(30 sec) -u -b 45M -t 30 -R amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15 25 @@ -193,7 +193,7 @@ Iperf - iperf (DL/TCP)(30 sec)(multi-ue profile) + iperf (DL/TCP)(30 sec) -t 30 -R amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15 2 @@ -202,7 +202,7 @@ Iperf - iperf (UL/1Mbps/UDP)(30 sec)(multi-ue profile) + iperf (UL/1Mbps/UDP)(30 sec) -u -b 15M -t 30 amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15 25 @@ -213,7 +213,7 @@ Iperf - iperf (UL/TCP)(30 sec)(multi-ue profile) + iperf (UL/TCP)(30 sec) -t 30 oc-cn5g amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15 diff --git a/ci-scripts/xml_files/container_sa_aw2s_asue_2x2.xml b/ci-scripts/xml_files/container_sa_aw2s_asue_2x2.xml index 739534be21..ed4a219f55 100644 --- a/ci-scripts/xml_files/container_sa_aw2s_asue_2x2.xml +++ b/ci-scripts/xml_files/container_sa_aw2s_asue_2x2.xml @@ -179,7 +179,7 @@ Iperf - iperf (DL/4Mbps/UDP)(30 sec)(multi-ue profile) + iperf (DL/4Mbps/UDP)(30 sec) -u -b 60M -t 30 -R amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15 25 @@ -190,7 +190,7 @@ Iperf - iperf (DL/TCP)(30 sec)(multi-ue profile) + iperf (DL/TCP)(30 sec) -t 30 -R amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15 3.9 @@ -199,7 +199,7 @@ Iperf - iperf (UL/1.5Mbps/UDP)(30 sec)(multi-ue profile) + iperf (UL/1.5Mbps/UDP)(30 sec) -u -b 22.5M -t 30 amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15 25 @@ -210,7 +210,7 @@ Iperf - iperf (UL/TCP)(30 sec)(multi-ue profile) + iperf (UL/TCP)(30 sec) -t 30 oc-cn5g amarisoft_ue_1 amarisoft_ue_2 amarisoft_ue_3 amarisoft_ue_4 amarisoft_ue_5 amarisoft_ue_6 amarisoft_ue_7 amarisoft_ue_8 amarisoft_ue_9 amarisoft_ue_10 amarisoft_ue_11 amarisoft_ue_12 amarisoft_ue_13 amarisoft_ue_14 amarisoft_ue_15 diff --git a/ci-scripts/xml_files/container_sa_b200_quectel.xml b/ci-scripts/xml_files/container_sa_b200_quectel.xml index 9f3559aff1..dacee9692f 100644 --- a/ci-scripts/xml_files/container_sa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_b200_quectel.xml @@ -200,14 +200,12 @@ Trigger Reestablishment ofqot echo ci force_reestab | nc -N 127.0.0.1 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment' - yes Custom_Command Verify Reestablishment ofqot echo ci get_reestab_count | nc -N 127.0.0.1 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1' - yes diff --git a/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml index dcbcb9a45f..b9535e6ea4 100644 --- a/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_e1_b200_quectel.xml @@ -188,14 +188,12 @@ Trigger Reestablishment (on DU) ofqot echo ci force_reestab | nc -N 127.0.0.1 9091 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment' - yes Custom_Command Verify Reestablishment (on CU) ofqot echo ci get_reestab_count | nc -N 127.0.0.1 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1' - yes diff --git a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml index 9622b2cf13..fd935be551 100644 --- a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml @@ -233,14 +233,12 @@ Trigger Reestablishment (on DU) ofqot echo ci force_reestab | nc -N 127.0.0.1 9091 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment' - yes Custom_Command Verify Reestablishment (on CU) ofqot echo ci get_reestab_count | nc -N 127.0.0.1 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1' - yes diff --git a/ci-scripts/xml_files/container_sa_fhi72_metanoia_up2_2x2.xml b/ci-scripts/xml_files/container_sa_fhi72_metanoia_up2_2x2.xml index e71ec3e37c..742b09e3d8 100644 --- a/ci-scripts/xml_files/container_sa_fhi72_metanoia_up2_2x2.xml +++ b/ci-scripts/xml_files/container_sa_fhi72_metanoia_up2_2x2.xml @@ -49,7 +49,6 @@ Setup sriov and network interfaces Metanoia cacofonix - yes @@ -92,7 +91,7 @@ Iperf - iperf (DL/570Mbps/UDP)(30 sec)(multi-ue profile) + iperf (DL/570Mbps/UDP)(30 sec) -u -b 570M -t 30 -R up2-fhi72 20 @@ -103,7 +102,7 @@ Iperf - iperf (DL/TCP)(30 sec)(multi-ue profile) + iperf (DL/TCP)(30 sec) -t 30 -R up2-fhi72 80 @@ -112,7 +111,7 @@ Iperf - iperf (UL/100Mbps/UDP)(30 sec)(multi-ue profile) + iperf (UL/100Mbps/UDP)(30 sec) -u -b 100M -t 30 up2-fhi72 20 @@ -123,7 +122,7 @@ Iperf - iperf (UL/TCP)(30 sec)(multi-ue profile) + iperf (UL/TCP)(30 sec) -t 30 up2-fhi72 80 @@ -166,7 +165,6 @@ Set CPU to idle state, set kernel parameters to default values cacofonix - yes diff --git a/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml b/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml index 4afe8f1b12..1d7cd323e4 100644 --- a/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml +++ b/ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml @@ -36,6 +36,7 @@ 100020 100030 100040 + 100011 103000 100002 130000 @@ -49,7 +50,6 @@ Setup sriov and network interfaces VVDN cacofonix - yes @@ -90,7 +90,7 @@ Iperf - iperf (DL/600Mbps/UDP)(30 sec)(multi-ue profile) + iperf (DL/600Mbps/UDP)(30 sec) -u -b 600M -t 30 -R up2-fhi72 20 @@ -99,9 +99,20 @@ oc-cn5g-20897 + + Iperf + Optional iperf (DL/700Mbps/UDP)(30 sec) + true + -u -b 700M -t 30 -R + up2-fhi72 + 10 + 95 + oc-cn5g-20897 + + Iperf - iperf (DL/TCP)(30 sec)(multi-ue profile) + iperf (DL/TCP)(30 sec) -t 30 -R up2-fhi72 40 @@ -110,7 +121,7 @@ Iperf - iperf (UL/80Mbps/UDP)(30 sec)(multi-ue profile) + iperf (UL/80Mbps/UDP)(30 sec) -u -b 80M -t 30 up2-fhi72 20 @@ -121,7 +132,7 @@ Iperf - iperf (UL/TCP)(30 sec)(multi-ue profile) + iperf (UL/TCP)(30 sec) -t 30 up2-fhi72 10 @@ -164,7 +175,6 @@ Set CPU to idle state, set kernel parameters to default values cacofonix - yes diff --git a/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml b/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml index 69201ebcc8..f116e97e24 100644 --- a/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_sc_b200_quectel.xml @@ -194,14 +194,12 @@ Trigger Reestablishment ofqot echo ci force_reestab | nc -N 127.0.0.1 9090 | grep -E 'Reset RLC counters of UE RNTI [0-9a-f]{4} to trigger reestablishment' - yes Custom_Command Verify Reestablishment ofqot echo ci get_reestab_count | nc -N 127.0.0.1 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1' - yes