From 0d3b42465ab10a9016754498c831fab1b6e2ce0f Mon Sep 17 00:00:00 2001 From: hardy Date: Fri, 18 Jun 2021 14:53:06 +0200 Subject: [PATCH 1/6] support of module attach detach + new nsa tests --- ci-scripts/cls_oaicitest.py | 118 ++++++++----- ci-scripts/main.py | 13 ++ ci-scripts/xml_files/fr1_nsa_quectel.xml | 4 +- .../fr1_nsa_quectel_attach_detach.xml | 167 ++++++++++++++++++ ci-scripts/xml_files/fr1_nsa_quectel_long.xml | 148 ++++++++++++++++ 5 files changed, 400 insertions(+), 50 deletions(-) create mode 100644 ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml create mode 100644 ci-scripts/xml_files/fr1_nsa_quectel_long.xml diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index d3d1d70c13..7283fba5af 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -994,38 +994,55 @@ class OaiCiTest(): for job in multi_jobs: job.join() - if (status_queue.empty()): - HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK) - self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) - return - else: - attach_status = True - html_queue = SimpleQueue() - while (not status_queue.empty()): - count = status_queue.get() - if (count < 0): - attach_status = False - device_id = status_queue.get() - message = status_queue.get() - if (count < 0): - html_cell = '
UE (' + device_id + ')\n' + message + '
' - else: - html_cell = '
UE (' + device_id + ')\n' + message + ' in ' + str(count + 2) + ' seconds
' - html_queue.put(html_cell) - if (attach_status): - cnt = 0 - while cnt < len(self.UEDevices): - if self.UEDevicesStatus[cnt] == CONST.UE_STATUS_ATTACHING: - self.UEDevicesStatus[cnt] = CONST.UE_STATUS_ATTACHED - cnt += 1 - HTML.CreateHtmlTestRowQueue('N/A', 'OK', len(self.UEDevices), html_queue) - result = re.search('T_stdout', str(RAN.Initialize_eNB_args)) - if result is not None: - logging.debug('Waiting 5 seconds to fill up record file') - time.sleep(5) - else: - HTML.CreateHtmlTestRowQueue('N/A', 'KO', len(self.UEDevices), html_queue) + if (status_queue.empty()): + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK) self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) + return + else: + attach_status = True + html_queue = SimpleQueue() + while (not status_queue.empty()): + count = status_queue.get() + if (count < 0): + attach_status = False + device_id = status_queue.get() + message = status_queue.get() + if (count < 0): + html_cell = '
UE (' + device_id + ')\n' + message + '
' + else: + html_cell = '
UE (' + device_id + ')\n' + message + ' in ' + str(count + 2) + ' seconds
' + html_queue.put(html_cell) + if (attach_status): + cnt = 0 + while cnt < len(self.UEDevices): + if self.UEDevicesStatus[cnt] == CONST.UE_STATUS_ATTACHING: + self.UEDevicesStatus[cnt] = CONST.UE_STATUS_ATTACHED + cnt += 1 + HTML.CreateHtmlTestRowQueue('N/A', 'OK', len(self.UEDevices), html_queue) + result = re.search('T_stdout', str(RAN.Initialize_eNB_args)) + if result is not None: + logging.debug('Waiting 5 seconds to fill up record file') + time.sleep(5) + else: + HTML.CreateHtmlTestRowQueue('N/A', 'KO', len(self.UEDevices), html_queue) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) + + else: #if an ID is specified, it is a module from the yaml infrastructure file + #Attention, as opposed to InitializeUE, the connect manager process is not checked as it is supposed to be active already + #only 1- module wakeup, 2- check IP address + Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) + Module_UE.Command("wup") + logging.debug("Waiting for IP address to be assigned") + time.sleep(20) + logging.debug("Retrieve IP address") + status=Module_UE.GetModuleIPAddress() + if status==0: + HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK) + logging.debug('UE IP addresss : '+ Module_UE.UEIPAddress) + else: #status==-1 failed to retrieve IP address + HTML.CreateHtmlTestRow('N/A', 'KO', CONST.UE_IP_ADDRESS_ISSUE) + self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC,InfraUE) + return def DetachUE_common(self, device_id, idx,COTS_UE): try: @@ -1084,10 +1101,7 @@ class OaiCiTest(): else:#if an ID is specified, it is a module from the yaml infrastructure file Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) Module_UE.Command("detach") - Module_UE.DisableTrace() - Module_UE.DisableCM() - archive_destination=Module_UE.LogCollect() - HTML.CreateHtmlTestRow('QLog at : '+archive_destination, 'OK', CONST.ALL_PROCESSES_OK) + HTML.CreateHtmlTestRow('NA', 'OK', CONST.ALL_PROCESSES_OK) @@ -3089,19 +3103,27 @@ class OaiCiTest(): os.kill(os.getppid(),signal.SIGUSR1) def TerminateUE(self,HTML,COTS_UE): - terminate_ue_flag = False - self.GetAllUEDevices(terminate_ue_flag) - multi_jobs = [] - i = 0 - for device_id in self.UEDevices: - p = Process(target= self.TerminateUE_common, args = (device_id,i,COTS_UE,)) - p.daemon = True - p.start() - multi_jobs.append(p) - i += 1 - for job in multi_jobs: - job.join() - HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) + if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB + terminate_ue_flag = False + self.GetAllUEDevices(terminate_ue_flag) + multi_jobs = [] + i = 0 + for device_id in self.UEDevices: + p = Process(target= self.TerminateUE_common, args = (device_id,i,COTS_UE,)) + p.daemon = True + p.start() + multi_jobs.append(p) + i += 1 + for job in multi_jobs: + job.join() + HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) + else: #if an ID is specified, it is a module from the yaml infrastructure file + Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) + Module_UE.Command("detach") + Module_UE.DisableTrace() + Module_UE.DisableCM() + archive_destination=Module_UE.LogCollect() + HTML.CreateHtmlTestRow('QLog at : '+archive_destination, 'OK', CONST.ALL_PROCESSES_OK) def TerminateOAIUE(self,HTML,RAN,COTS_UE,EPC, InfraUE): SSH = sshconnection.SSHConnection() diff --git a/ci-scripts/main.py b/ci-scripts/main.py index cbd323366b..142ecdf202 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -210,12 +210,25 @@ def GetParametersFromXML(action): CiTestObj.ue_id = ue_id elif action == 'Attach_UE': + ue_id = test.findtext('id') + if (ue_id is None): + CiTestObj.ue_id = "" + else: + CiTestObj.ue_id = ue_id nbMaxUEtoAttach = test.findtext('nbMaxUEtoAttach') if (nbMaxUEtoAttach is None): CiTestObj.nbMaxUEtoAttach = -1 else: CiTestObj.nbMaxUEtoAttach = int(nbMaxUEtoAttach) + elif action == 'Terminate_UE': + ue_id = test.findtext('id') + if (ue_id is None): + CiTestObj.ue_id = "" + else: + CiTestObj.ue_id = ue_id + + elif action == 'CheckStatusUE': expectedNBUE = test.findtext('expectedNbOfConnectedUEs') if (expectedNBUE is None): diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml index 2e8c07968d..980b55c30c 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml @@ -52,8 +52,8 @@ - Detach_UE - Detach UE + Terminate_UE + Terminate Quectel idefix diff --git a/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml b/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml new file mode 100644 index 0000000000..f78cd3bd82 --- /dev/null +++ b/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml @@ -0,0 +1,167 @@ + + + TEST-NSA-FR1-TM1 + NSA Ping Attach Detach with QUECTEL + tasks + 1 + + 030000 + 040000 + 000002 + 010000 + 000001 + 050000 + 000001 + 010004 + 000001 + 010003 + 000001 + 050000 + 000001 + 010004 + 000001 + 010003 + 000001 + 050000 + 000001 + 010002 + 080001 + 080000 + + + + + Initialize_UE + Initialize Quectel + idefix + + + + + Terminate_UE + Terminate Quectel + idefix + + + + Attach_UE + Attach Quectel + idefix + + + + Detach_UE + Detach Quectel + idefix + + + + + Initialize_eNB + Initialize eNB + -O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf + 0 + 0 + lte + yes + + + + + Initialize_eNB + Initialize gNB + -O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q + 1 + 1 + nr + + + + IdleSleep + Sleep + 5 + + + + IdleSleep + Sleep + 20 + + + + + Ping + Ping: 20pings in 20sec + idefix + -c 20 + 50 + + + + Ping + Ping: 100pings in 20sec + idefix + -c 100 -i 0.2 + 50 + + + + Iperf + iperf (DL/20Mbps/UDP)(60 sec)(single-ue profile) + -u -b 20M -t 60 + DL + idefix + 50 + single-ue + + + + Iperf + iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile) + -u -b 3M -t 60 + UL + idefix + 50 + single-ue + + + + + Terminate_eNB + Terminate eNB + 0 + 0 + lte + + + + Terminate_eNB + Terminate gNB + 1 + 1 + nr + + + + diff --git a/ci-scripts/xml_files/fr1_nsa_quectel_long.xml b/ci-scripts/xml_files/fr1_nsa_quectel_long.xml new file mode 100644 index 0000000000..21ff7a63c5 --- /dev/null +++ b/ci-scripts/xml_files/fr1_nsa_quectel_long.xml @@ -0,0 +1,148 @@ + + + TEST-NSA-FR1-TM1 + NSA Ping DL UL with QUECTEL (Longer) + tasks + 1 + + 030000 + 040000 + 000002 + 010000 + 000001 + 050000 + 050001 + 000001 + 070000 + 000001 + 070001 + 000001 + 010002 + 080001 + 080000 + + + + + Initialize_UE + Initialize Quectel + idefix + + + + + Terminate_UE + Terminate Quectel + idefix + + + + + Initialize_eNB + Initialize eNB + -O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf + 0 + 0 + lte + yes + + + + + Initialize_eNB + Initialize gNB + -O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q + 1 + 1 + nr + + + + IdleSleep + Sleep + 5 + + + + IdleSleep + Sleep + 20 + + + + + Ping + Ping: 20pings in 20sec + idefix + -c 20 + 50 + + + + Ping + Ping: 100pings in 20sec + idefix + -c 100 -i 0.2 + 50 + + + + Iperf + iperf (DL/20Mbps/UDP)(600 sec)(single-ue profile) + -u -b 20M -t 600 + DL + idefix + 50 + single-ue + + + + Iperf + iperf (UL/3Mbps/UDP)(600 sec)(single-ue profile) + -u -b 3M -t 600 + UL + idefix + 50 + single-ue + + + + + Terminate_eNB + Terminate eNB + 0 + 0 + lte + + + + Terminate_eNB + Terminate gNB + 1 + 1 + nr + + + + From 86225c3b8fd4fb61ec8bfadb9cb5d3652a5e80df Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Mon, 21 Jun 2021 14:35:14 +0200 Subject: [PATCH 2/6] implement optional Qlog trace --- ci-scripts/Jenkinsfile-trig-nsa | 25 ++++++++---- ci-scripts/cls_module_ue.py | 48 +++++++++++++----------- ci-scripts/cls_oaicitest.py | 7 +++- ci-scripts/main.py | 5 ++- ci-scripts/xml_files/fr1_nsa_quectel.xml | 1 + 5 files changed, 52 insertions(+), 34 deletions(-) diff --git a/ci-scripts/Jenkinsfile-trig-nsa b/ci-scripts/Jenkinsfile-trig-nsa index 8f623ffb05..1c479a5a2a 100644 --- a/ci-scripts/Jenkinsfile-trig-nsa +++ b/ci-scripts/Jenkinsfile-trig-nsa @@ -55,14 +55,23 @@ pipeline { string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) ] - //calling Benetel sub job - //build job: "RAN-CI-BENETEL", wait : false, propagate : false, parameters: [ - // string(name: 'eNB_MR', value: String.valueOf(MR)), - // string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), - // string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), - // string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), - // booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) - //] + //calling NSA long sub job + build job: "RAN-NSA-Mini-Module-Long", wait : false, propagate : false, parameters: [ + string(name: 'eNB_MR', value: String.valueOf(MR)), + string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), + string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), + string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), + booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) + ] + //calling NSA attach/detach job + build job: "RAN-NSA-Mini-Module-Attach-Detach", wait : false, propagate : false, parameters: [ + string(name: 'eNB_MR', value: String.valueOf(MR)), + string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), + string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), + string(name: 'eNB_TargetBranch', value: String.valueOf(TARGET_BRANCH)), + booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) + ] + } } } diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py index cb5c81e271..0ad493ad40 100644 --- a/ci-scripts/cls_module_ue.py +++ b/ci-scripts/cls_module_ue.py @@ -50,7 +50,8 @@ class Module_UE: setattr(self, k, v) self.UEIPAddress = "" #dictionary linking command names and related module scripts - self.cmd_dict= {"wup": self.WakeupScript,"detach":self.DetachScript}#dictionary of function scripts + self.cmd_dict= {"wup": self.WakeupScript,"detach":self.DetachScript}#dictionary of function scripts + self.ue_trace='' @@ -130,13 +131,14 @@ class Module_UE: return -1 def EnableTrace(self): - mySSH = sshconnection.SSHConnection() - mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) - #delete old artifacts - mySSH.command('echo ' + self.HostPassword + ' | sudo -S rm -rf ci_qlog','\$',5) - #start Trace, artifact is created in home dir - mySSH.command('echo $USER; nohup sudo -E QLog/QLog -s ci_qlog -f NR5G.cfg &','\$', 5) - mySSH.close() + if self.ue_trace=="yes": + mySSH = sshconnection.SSHConnection() + mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) + #delete old artifacts + mySSH.command('echo ' + self.HostPassword + ' | sudo -S rm -rf ci_qlog','\$',5) + #start Trace, artifact is created in home dir + mySSH.command('echo $USER; nohup sudo -E QLog/QLog -s ci_qlog -f NR5G.cfg &','\$', 5) + mySSH.close() def DisableTrace(self): mySSH = sshconnection.SSHConnection() @@ -153,18 +155,20 @@ class Module_UE: def LogCollect(self): - mySSH = sshconnection.SSHConnection() - mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) - #archive qlog to USB stick in /media/usb-drive/ci_qlogs with datetime suffix - now=datetime.now() - now_string = now.strftime("%Y%m%d-%H%M") - source='ci_qlog' - destination='/media/usb-drive/ci_qlogs/ci_qlog_'+now_string+'.zip' - #qlog artifact is zipped into the target folder - mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S zip -r '+destination+' '+source+' &','\$', 10) - mySSH.close() - #post action : log cleaning to make sure enough space is reserved for the next run - Log_Mgt=cls_log_mgt.Log_Mgt(self.HostIPAddress, self.HostPassword, "/media/usb-drive/ci_qlogs") - Log_Mgt.LogRotation() - + if self.ue_trace=="yes": + mySSH = sshconnection.SSHConnection() + mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) + #archive qlog to USB stick in /media/usb-drive/ci_qlogs with datetime suffix + now=datetime.now() + now_string = now.strftime("%Y%m%d-%H%M") + source='ci_qlog' + destination='/media/usb-drive/ci_qlogs/ci_qlog_'+now_string+'.zip' + #qlog artifact is zipped into the target folder + mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S zip -r '+destination+' '+source+' &','\$', 10) + mySSH.close() + #post action : log cleaning to make sure enough space is reserved for the next run + Log_Mgt=cls_log_mgt.Log_Mgt(self.HostIPAddress, self.HostPassword, "/media/usb-drive/ci_qlogs") + Log_Mgt.LogRotation() + else: + destination="" return destination diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 7283fba5af..6f61fddbc3 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -160,6 +160,7 @@ class OaiCiTest(): self.air_interface='' self.expectedNbOfConnectedUEs = 0 self.ue_id = '' #used for module identification + self.ue_trace ='' #used to enable QLog trace for Module UE, passed to Module UE object at InitializeUE() def BuildOAIUE(self,HTML): @@ -367,7 +368,7 @@ class OaiCiTest(): except: os.kill(os.getppid(),signal.SIGUSR1) - def InitializeUE(self,HTML,RAN,EPC, COTS_UE, InfraUE): + def InitializeUE(self,HTML,RAN,EPC, COTS_UE, InfraUE,ue_trace): if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '': HELP.GenericHelp(CONST.Version) @@ -386,6 +387,7 @@ class OaiCiTest(): else: #if an ID is specified, it is a module from the yaml infrastructure file #RH Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) + Module_UE.ue_trace=ue_trace is_module=Module_UE.CheckCMProcess() if is_module: Module_UE.EnableTrace() @@ -3102,7 +3104,7 @@ class OaiCiTest(): except: os.kill(os.getppid(),signal.SIGUSR1) - def TerminateUE(self,HTML,COTS_UE): + def TerminateUE(self,HTML,COTS_UE,InfraUE,ue_trace): if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB terminate_ue_flag = False self.GetAllUEDevices(terminate_ue_flag) @@ -3119,6 +3121,7 @@ class OaiCiTest(): HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) else: #if an ID is specified, it is a module from the yaml infrastructure file Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) + Module_UE.ue_trace=ue_trace Module_UE.Command("detach") Module_UE.DisableTrace() Module_UE.DisableCM() diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 142ecdf202..066e67d6be 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -197,6 +197,7 @@ def GetParametersFromXML(action): elif action == 'Initialize_UE': ue_id = test.findtext('id') + CiTestObj.ue_trace=test.findtext('UE_Trace')#temporary variable, to be passed to Module_UE in Initialize_UE call if (ue_id is None): CiTestObj.ue_id = "" else: @@ -727,9 +728,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re elif action == 'Terminate_eNB': RAN.TerminateeNB(HTML, EPC) elif action == 'Initialize_UE': - CiTestObj.InitializeUE(HTML,RAN, EPC, COTS_UE, InfraUE) + CiTestObj.InitializeUE(HTML,RAN, EPC, COTS_UE, InfraUE, CiTestObj.ue_trace) elif action == 'Terminate_UE': - CiTestObj.TerminateUE(HTML,COTS_UE) + CiTestObj.TerminateUE(HTML,COTS_UE, InfraUE, CiTestObj.ue_trace) elif action == 'Attach_UE': CiTestObj.AttachUE(HTML,RAN,EPC,COTS_UE,InfraUE) elif action == 'Detach_UE': diff --git a/ci-scripts/xml_files/fr1_nsa_quectel.xml b/ci-scripts/xml_files/fr1_nsa_quectel.xml index 980b55c30c..7ec3a5f140 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel.xml @@ -48,6 +48,7 @@ Initialize_UE Initialize Quectel idefix + yes From 49088aed1d16506bd29765814b7dfb77a3aa9a67 Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Tue, 22 Jun 2021 11:11:57 +0200 Subject: [PATCH 3/6] fix AutoTerminate --- ci-scripts/cls_oaicitest.py | 14 +++++--------- .../xml_files/fr1_nsa_quectel_attach_detach.xml | 1 + 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 6f61fddbc3..5cf785b08e 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -3126,7 +3126,10 @@ class OaiCiTest(): Module_UE.DisableTrace() Module_UE.DisableCM() archive_destination=Module_UE.LogCollect() - HTML.CreateHtmlTestRow('QLog at : '+archive_destination, 'OK', CONST.ALL_PROCESSES_OK) + if Module_UE.ue_trace=='yes': + HTML.CreateHtmlTestRow('QLog at : '+archive_destination, 'OK', CONST.ALL_PROCESSES_OK) + else: + HTML.CreateHtmlTestRow('QLog trace is disabled', 'OK', CONST.ALL_PROCESSES_OK) def TerminateOAIUE(self,HTML,RAN,COTS_UE,EPC, InfraUE): SSH = sshconnection.SSHConnection() @@ -3183,20 +3186,13 @@ class OaiCiTest(): HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK) def AutoTerminateUEandeNB(self,HTML,RAN,COTS_UE,EPC,InfraUE): - if self.ue_id!='': - Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id]) - Module_UE.Command("detach") - Module_UE.DisableTrace() - Module_UE.DisableCM() - archive_destination=Module_UE.LogCollect() - HTML.CreateHtmlTestRow('QLog at : '+archive_destination, 'OK', CONST.ALL_PROCESSES_OK) if (self.ADBIPAddress != 'none'): self.testCase_id = 'AUTO-KILL-UE' HTML.testCase_id=self.testCase_id self.desc = 'Automatic Termination of UE' HTML.desc='Automatic Termination of UE' self.ShowTestID() - self.TerminateUE(HTML,COTS_UE) + self.TerminateUE(HTML,COTS_UE,InfraUE,self.ue_trace) if (self.Initialize_OAI_UE_args != ''): self.testCase_id = 'AUTO-KILL-OAI-UE' HTML.testCase_id=self.testCase_id diff --git a/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml b/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml index f78cd3bd82..2263f731c5 100644 --- a/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml +++ b/ci-scripts/xml_files/fr1_nsa_quectel_attach_detach.xml @@ -55,6 +55,7 @@ Initialize_UE Initialize Quectel idefix + yes From 014c09fdddaae73aecd02cb29ab6ca9d933729f4 Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Tue, 22 Jun 2021 18:36:04 +0200 Subject: [PATCH 4/6] fix nsa job trigger --- ci-scripts/Jenkinsfile-trig-nsa | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-scripts/Jenkinsfile-trig-nsa b/ci-scripts/Jenkinsfile-trig-nsa index 1c479a5a2a..44527a1a38 100644 --- a/ci-scripts/Jenkinsfile-trig-nsa +++ b/ci-scripts/Jenkinsfile-trig-nsa @@ -48,7 +48,7 @@ pipeline { COMMIT_ID=COMMIT_ID.trim() echo "Testing NSA on : ${MR} ${SRC_BRANCH} ${COMMIT_ID}" //calling NSA sub job - build job: "RAN-NSA-Mini-Module", wait : false, propagate : false, parameters: [ + build job: "RAN-NSA-Mini-Module", wait : true, propagate : false, parameters: [ string(name: 'eNB_MR', value: String.valueOf(MR)), string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), @@ -56,7 +56,7 @@ pipeline { booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) ] //calling NSA long sub job - build job: "RAN-NSA-Mini-Module-Long", wait : false, propagate : false, parameters: [ + build job: "RAN-NSA-Mini-Module-Long", wait : true, propagate : false, parameters: [ string(name: 'eNB_MR', value: String.valueOf(MR)), string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), @@ -64,7 +64,7 @@ pipeline { booleanParam(name: 'eNB_AllowMergeRequestProcess', value: Boolean.valueOf(ALLOW_MERGE)) ] //calling NSA attach/detach job - build job: "RAN-NSA-Mini-Module-Attach-Detach", wait : false, propagate : false, parameters: [ + build job: "RAN-NSA-Mini-Module-Attach-Detach", wait : true, propagate : false, parameters: [ string(name: 'eNB_MR', value: String.valueOf(MR)), string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)), string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)), From 195a87fdc7dfb59a852f7dedc0deaa89dcc40e3e Mon Sep 17 00:00:00 2001 From: Remi Hardy Date: Wed, 23 Jun 2021 08:41:43 +0200 Subject: [PATCH 5/6] fixing missing (new) arguments in TerminateUE call --- ci-scripts/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 066e67d6be..0718ee6396 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -483,7 +483,7 @@ elif re.match('^TerminateUE$', mode, re.IGNORECASE): HELP.GenericHelp(CONST.Version) sys.exit('Insufficient Parameter') signal.signal(signal.SIGUSR1, receive_signal) - CiTestObj.TerminateUE(HTML,COTS_UE) + CiTestObj.TerminateUE(HTML,COTS_UE,InfraUE,CiTestObj.ue_trace) elif re.match('^TerminateOAIUE$', mode, re.IGNORECASE): if CiTestObj.UEIPAddress == '' or CiTestObj.UEUserName == '' or CiTestObj.UEPassword == '': HELP.GenericHelp(CONST.Version) From 9fa3e1a758262c8b67c192e1df322cec82b52a8c Mon Sep 17 00:00:00 2001 From: hardy Date: Sat, 26 Jun 2021 22:05:08 +0200 Subject: [PATCH 6/6] fix the module CM process start/check --- ci-scripts/cls_module_ue.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci-scripts/cls_module_ue.py b/ci-scripts/cls_module_ue.py index 0ad493ad40..75b628fd1f 100644 --- a/ci-scripts/cls_module_ue.py +++ b/ci-scripts/cls_module_ue.py @@ -76,9 +76,10 @@ class Module_UE: logging.debug('Starting ' + self.Process['Name']) mySSH = sshconnection.SSHConnection() mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword) - mySSH.command('echo ' + self.HostPassword + ' | sudo -S ' + self.Process['Cmd'] + ' &','\$',5) + mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S ' + self.Process['Cmd'] + ' &','\$',5) mySSH.close() #checking the process + time.sleep(5) HOST=self.HostIPAddress COMMAND="ps aux | grep " + self.Process['Name'] + " | grep -v grep " logging.debug(COMMAND)