diff --git a/ci-scripts/ci_infra.yaml b/ci-scripts/ci_infra.yaml index 378d8651e0..cc7c642ca1 100644 --- a/ci-scripts/ci_infra.yaml +++ b/ci-scripts/ci_infra.yaml @@ -396,7 +396,3 @@ l2sim4g_ext_dn: Host: "%%current_host%%" NetworkScript: docker exec l2sim4g-trf-gen ip a show dev eth0 CmdPrefix: docker exec l2sim4g-trf-gen - -test: - Host: localhost - NetworkScript: echo "inet 127.0.0.1 mtu 1500" diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 5268a73e9a..e141277a03 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -434,7 +434,7 @@ class OaiCiTest(): return (True, message) - def Ping(self, HTML, EPC, CONTAINERS): + def Ping(self, HTML, EPC, CONTAINERS, infra_file="ci_infra.yaml"): if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') @@ -446,7 +446,7 @@ class OaiCiTest(): ymlPath = CONTAINERS.yamlPath[0].split('/') logPath = f'{os.getcwd()}/../cmake_targets/log/{ymlPath[-1]}' local.run(f'mkdir -p {logPath}', silent=True) - ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)] + ues = [cls_module.Module_UE(ue_id, server_name, infra_file) for ue_id, server_name in zip(self.ue_ids, self.nodes)] logging.debug(ues) with concurrent.futures.ThreadPoolExecutor(max_workers=64) as executor: futures = [executor.submit(self.Ping_common, EPC, ue, logPath) for ue in ues] @@ -516,7 +516,7 @@ class OaiCiTest(): return (status, f'{ue_header}\n{msg}') - def Iperf(self,HTML,EPC,CONTAINERS): + def Iperf(self, HTML, EPC, CONTAINERS, infra_file="ci_infra.yaml"): if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '': HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') @@ -530,8 +530,8 @@ class OaiCiTest(): ymlPath = CONTAINERS.yamlPath[0].split('/') logPath = f'{os.getcwd()}/../cmake_targets/log/{ymlPath[-1]}' local.run(f'mkdir -p {logPath}', silent=True) - ues = [cls_module.Module_UE(ue_id, server_name) for ue_id, server_name in zip(self.ue_ids, self.nodes)] - svr = cls_module.Module_UE(self.svr_id,self.svr_node) + ues = [cls_module.Module_UE(ue_id, server_name, infra_file) for ue_id, server_name in zip(self.ue_ids, self.nodes)] + svr = cls_module.Module_UE(self.svr_id,self.svr_node, infra_file) logging.debug(ues) with concurrent.futures.ThreadPoolExecutor(max_workers=64) as executor: futures = [executor.submit(self.Iperf_Module, EPC, ue, svr, i, len(ues), logPath) for i, ue in enumerate(ues)] diff --git a/ci-scripts/tests/config/infra_ping_iperf.yaml b/ci-scripts/tests/config/infra_ping_iperf.yaml new file mode 100644 index 0000000000..ac09c9e412 --- /dev/null +++ b/ci-scripts/tests/config/infra_ping_iperf.yaml @@ -0,0 +1,3 @@ +test: + Host: localhost + NetworkScript: echo "inet 127.0.0.1 mtu 1500" diff --git a/ci-scripts/tests/ping-iperf.py b/ci-scripts/tests/ping-iperf.py index 6ba35d04d3..39d08823ff 100644 --- a/ci-scripts/tests/ping-iperf.py +++ b/ci-scripts/tests/ping-iperf.py @@ -33,8 +33,9 @@ class TestPingIperf(unittest.TestCase): def test_ping(self): self.ci.ping_args = "-c3 127.0.0.1" self.ci.ping_packetloss_threshold = "0" + infra_file = "tests/config/infra_ping_iperf.yaml" # TODO Should need nothing but options and UE(s) to use - success = self.ci.Ping(self.html, self.epc, self.cont) + success = self.ci.Ping(self.html, self.epc, self.cont, infra_file=infra_file) self.assertTrue(success) def test_iperf(self): @@ -47,8 +48,9 @@ class TestPingIperf(unittest.TestCase): self.ci.iperf_packetloss_threshold = "0" self.ci.iperf_bitrate_threshold = "0" self.ci.iperf_profile = "balanced" + infra_file = "tests/config/infra_ping_iperf.yaml" # TODO Should need nothing but options and UE(s) to use - success = self.ci.Iperf(self.html, self.epc, self.cont) + success = self.ci.Iperf(self.html, self.epc, self.cont, infra_file=infra_file) self.assertTrue(success) if __name__ == '__main__':