From c40130ecf7cecf5ea78422724205fc6ffefe0ddd Mon Sep 17 00:00:00 2001 From: Raphael Defosseux <raphael.defosseux@eurecom.fr> Date: Mon, 8 Nov 2021 20:33:18 +0100 Subject: [PATCH] fix(ci): fix some typos Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr> --- ci-scripts/Jenkinsfile-tmp-multi-enb-nsa | 2 +- ci-scripts/cls_containerize.py | 2 +- ci-scripts/cls_oaicitest.py | 2 +- ci-scripts/ran.py | 8 ++++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa index 5a1fbdb96bf..c9585f115d2 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa @@ -293,7 +293,7 @@ pipeline { echo '\u2705 \u001B[32mLog Collection (SPGW or SMF/UPF)\u001B[0m' sh "python3 ci-scripts/main.py --mode=LogCollectSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}" if (params.EPC_Type == 'OAICN5G') { - sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/smf-upf.log.zip ./spgw.log.${env.BUILD_ID}.zip || true" + sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./smf-upf.log.${env.BUILD_ID}.zip || true" } else { sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/spgw.log.zip ./spgw.log.${env.BUILD_ID}.zip || true" } diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index f2b1665c543..dac24080627 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -206,7 +206,7 @@ class Containerize(): self.testCase_id = HTML.testCase_id - self._createWorkspace(mySSH, lPassword, lSourcePath) + self._createWorkspace(mySSH, lPassWord, lSourcePath) # if asterix, copy the entitlement and subscription manager configurations if self.host == 'Red Hat': diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 46849694710..c544c74eb23 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -2325,7 +2325,7 @@ class OaiCiTest(): server_filename = 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log' SSH.command('docker exec -it prod-trf-gen /bin/bash -c "killall --signal SIGKILL iperf"', '\$', 5) iperf_cmd = 'echo $USER; nohup bin/iperf -s -u 2>&1 > ' + server_filename - cmd = 'docker exec -it prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"' + cmd = 'docker exec -d prod-trf-gen /bin/bash -c \"' + iperf_cmd + '\"' SSH.command(cmd,'\$',5) SSH.close() diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 7d8f055226e..a7d44f58e0e 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -593,8 +593,12 @@ class RANManagement(): lPassWord = self.eNBPassword mySSH = SSH.SSHConnection() mySSH.open(lIpAddr, lUserName, lPassWord) - mySSH.command('stdbuf -o0 ps -aux | grep --color=never ' + self.air_interface[self.eNB_instance] + ' | grep -v grep', '\$', 5) - result = re.search(self.air_interface[self.eNB_instance], mySSH.getBefore()) + if self.air_interface[self.eNB_instance] == '': + pattern = 'softmodem' + else: + pattern = self.air_interface[self.eNB_instance] + mySSH.command('stdbuf -o0 ps -aux | grep --color=never ' + pattern + ' | grep -v grep', '\$', 5) + result = re.search(pattern, mySSH.getBefore()) if result is None: logging.debug('\u001B[1;37;41m eNB Process Not Found! \u001B[0m') status_queue.put(CONST.ENB_PROCESS_FAILED) -- GitLab