From 8cc639f8a9d23f5be5b0e29f2a05e3abbad535d2 Mon Sep 17 00:00:00 2001 From: hardy Date: Tue, 23 Nov 2021 23:13:45 +0100 Subject: [PATCH 1/7] new xml for sa + oaiue test --- ci-scripts/Jenkinsfile-tmp-multi-enb-nsa | 52 ++++++++- ci-scripts/cls_oaicitest.py | 2 +- ci-scripts/xml_files/fr1_gnb_build.xml | 7 -- ci-scripts/xml_files/fr1_sa_oaiue_b200.xml | 122 +++++++++++++++++++++ 4 files changed, 172 insertions(+), 11 deletions(-) create mode 100644 ci-scripts/xml_files/fr1_sa_oaiue_b200.xml diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa index dd9fbbd03c..f594511b0a 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa @@ -117,6 +117,15 @@ pipeline { if (params.eNB2_Credentials == null) { allParametersPresent = false } + if (params.UE_IPAddress == null) { + allParametersPresent = false + } + if (params.UE_SourceCodePath == null) { + allParametersPresent = false + } + if (params.UE_Credentials == null) { + allParametersPresent = false + } // the following 4 parameters should be pushed by the master trigger // if not present, take the job GIT variables (used for developing) if (params.eNB_Repository == null) { @@ -213,21 +222,22 @@ pipeline { [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'], [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'], [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'], - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password'] + [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password'], + [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'] ]) { sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}" String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") for (xmlFile in myXmlTestSuite) { if (fileExists(xmlFile)) { try { - sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}" + sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}" } catch (Exception e) { currentBuild.result = 'FAILURE' buildStageStatus = false } } } - sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" + sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password}" } } } @@ -253,6 +263,24 @@ pipeline { } } } + stage('Log Collection (OAI UE - Build)') { + steps { + echo '\u2705 \u001B[32mLog Collection (OAI UE - Build)\u001B[0m' + withCredentials([ + [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'] + ]) { + sh "python3 ci-scripts/main.py --mode=LogCollectBuild --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}" + + echo '\u2705 \u001B[32mLog Transfer (UE - Build)\u001B[0m' + sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true" + } + script { + if(fileExists("build.log.${env.BUILD_ID}.zip")) { + archiveArtifacts "build.log.${env.BUILD_ID}.zip" + } + } + } + } stage('Log Collection (eNB - Run)') { steps { withCredentials([ @@ -271,6 +299,24 @@ pipeline { } } } + stage('Log Collection (OAI UE - Run)') { + steps { + withCredentials([ + [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'] + ]) { + echo '\u2705 \u001B[32mLog Collection (OAI UE - Run)\u001B[0m' + sh "python3 ci-scripts/main.py --mode=LogCollectOAIUE --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}" + + echo '\u2705 \u001B[32mLog Transfer (OAI UE - Run)\u001B[0m' + sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/ue.log.zip ./ue.log.${env.BUILD_ID}.zip || true" + } + script { + if(fileExists("ue.log.${env.BUILD_ID}.zip")) { + archiveArtifacts "ue.log.${env.BUILD_ID}.zip" + } + } + } + } stage('Log Collection (CN)') { // Bypassing this stage if EPC server is not defined when { diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index cc6e235ab3..291b3acc39 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -1552,7 +1552,7 @@ class OaiCiTest(): SSH.command('cd scripts', '\$', 5) # In case of a docker-based deployment, we need to ping from the trf-gen container launchFromTrfContainer = False - if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE): + if (re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE)) or (re.match('OAICN5G', EPC.Type, re.IGNORECASE)): launchFromTrfContainer = True if launchFromTrfContainer: ping_status = SSH.command('docker exec -it prod-trf-gen /bin/bash -c "ping ' + self.ping_args + ' ' + UE_IPAddress + '" 2>&1 | tee ping_' + self.testCase_id + '_' + device_id + '.log', '\$', int(ping_time[0])*1.5) diff --git a/ci-scripts/xml_files/fr1_gnb_build.xml b/ci-scripts/xml_files/fr1_gnb_build.xml index 43cff75620..13d85fccc4 100644 --- a/ci-scripts/xml_files/fr1_gnb_build.xml +++ b/ci-scripts/xml_files/fr1_gnb_build.xml @@ -38,11 +38,4 @@ True - - WaitEndBuild_eNB - Wait for end of Build gNB - 0 - 0 - - diff --git a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml new file mode 100644 index 0000000000..7bf80999a3 --- /dev/null +++ b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml @@ -0,0 +1,122 @@ + + + TEST-SA-FR1-Tab1 + SA Ping DL UL with OAI NR UE + tasks + 1 + + 040000 + 000002 + 010000 + 000001 + 050000 + 050001 + 000001 + 010002 + 080000 + + + + + Initialize_OAI_UE + Initialize OAI UE + --dlsch-parallel 8 --sa -O ue.conf --usrp-args "serial=30C51D1" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 -E + + + + Terminate_OAI_UE + Terminate OAI UE + + + + + Initialize_eNB + Initialize gNB + -O ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf --sa -q --usrp-tx-thread-config 1 --thread-pool 0,2,4,6 + 0 + 0 + nr + yes + yes + 192.168.18.240 + + + + IdleSleep + Sleep + 5 + + + + IdleSleep + Sleep + 20 + + + + + Ping + Ping from CN to UE: 20pings in 20sec + -c 20 + 5 + + + + Ping + Ping from CN to UE: 100pings in 20sec + -c 100 -i 0,2 + 5 + + + + Iperf + iperf (DL/60Mbps/UDP)(60 sec)(single-ue profile) + -u -b 60M -t 60 + DL + nrmodule2_quectel + 5 + single-ue + + + + Iperf + iperf (UL/3Mbps/UDP)(60 sec)(single-ue profile) + -u -b 3M -t 60 + UL + nrmodule2_quectel + 5 + single-ue + + + + + Terminate_eNB + Terminate gNB + 0 + 0 + nr + + + + From 98cd63e0dc16fe4fe52059a8660bea2e2a570688 Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 25 Nov 2021 20:57:43 +0100 Subject: [PATCH 2/7] fix ue air interface --- ci-scripts/xml_files/fr1_sa_oaiue_b200.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml index 7bf80999a3..ada96adaa6 100644 --- a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml +++ b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml @@ -41,6 +41,7 @@ Initialize_OAI_UE Initialize OAI UE + nr --dlsch-parallel 8 --sa -O ue.conf --usrp-args "serial=30C51D1" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 -E From 311af7788ba86d9a86956d9a15d70e02888af4de Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 25 Nov 2021 21:23:59 +0100 Subject: [PATCH 3/7] ue conf file into repo --- ci-scripts/conf_files/ue.sa.conf | 8 ++++++++ ci-scripts/xml_files/fr1_sa_oaiue_b200.xml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 ci-scripts/conf_files/ue.sa.conf diff --git a/ci-scripts/conf_files/ue.sa.conf b/ci-scripts/conf_files/ue.sa.conf new file mode 100644 index 0000000000..3e6f78f709 --- /dev/null +++ b/ci-scripts/conf_files/ue.sa.conf @@ -0,0 +1,8 @@ +uicc0 = { + imsi = "208970100001127"; + key = "fec86ba6eb707ed08905757b1bb44b8f"; + opc= "c42449363bbad02b66d16bc975d77cc1"; + dnn= "oai"; + nssai_sst=1; + nssai_sd=66051; +} diff --git a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml index ada96adaa6..7dd2fa00ec 100644 --- a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml +++ b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml @@ -42,7 +42,7 @@ Initialize_OAI_UE Initialize OAI UE nr - --dlsch-parallel 8 --sa -O ue.conf --usrp-args "serial=30C51D1" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 -E + --dlsch-parallel 8 --sa -O ci-scripts/conf_files/ue.sa.conf --usrp-args "serial=30C51D1" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 -E From 5d66f8cf9c97179b589ede2895e5c403366758c8 Mon Sep 17 00:00:00 2001 From: hardy Date: Fri, 26 Nov 2021 11:47:23 +0100 Subject: [PATCH 4/7] oaiue runs from ran_build/build --- ci-scripts/xml_files/fr1_sa_oaiue_b200.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml index 7dd2fa00ec..27ee322124 100644 --- a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml +++ b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml @@ -42,7 +42,7 @@ Initialize_OAI_UE Initialize OAI UE nr - --dlsch-parallel 8 --sa -O ci-scripts/conf_files/ue.sa.conf --usrp-args "serial=30C51D1" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 -E + --dlsch-parallel 8 --sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "serial=30C51D1" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 -E From be3d5da14eabf3492e4f5ff2e5cdea348c5c5ace Mon Sep 17 00:00:00 2001 From: hardy Date: Fri, 26 Nov 2021 16:59:41 +0100 Subject: [PATCH 5/7] fix bugs --- ci-scripts/cls_oaicitest.py | 2 +- ci-scripts/xml_files/fr1_sa_oaiue_b200.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 291b3acc39..3a218b17b8 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -3348,7 +3348,7 @@ class OaiCiTest(): self.desc = 'Automatic Termination of OAI-UE' HTML.desc = self.desc self.ShowTestID() - self.TerminateOAIUE(HTML,RAN,COTS_UE,EPC,InfraUE) + self.TerminateOAIUE(HTML,RAN,COTS_UE,EPC,InfraUE,CONTAINERS) if (RAN.Initialize_eNB_args != ''): self.testCase_id = 'AUTO-KILL-RAN' HTML.testCase_id = self.testCase_id diff --git a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml index 27ee322124..2592aaead9 100644 --- a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml +++ b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml @@ -86,7 +86,7 @@ Ping Ping from CN to UE: 100pings in 20sec - -c 100 -i 0,2 + -c 100 -i 0.2 5 From e8227e162ba907e8963adad06bae9fae318003ee Mon Sep 17 00:00:00 2001 From: hardy Date: Fri, 26 Nov 2021 18:10:58 +0100 Subject: [PATCH 6/7] some delay to let oaiue stabilize --- ci-scripts/xml_files/fr1_sa_oaiue_b200.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml index 2592aaead9..030d9a1ab0 100644 --- a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml +++ b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml @@ -29,7 +29,7 @@ 040000 000002 010000 - 000001 + 000002 050000 050001 000001 From 3f278d6f81f070134f3c65e3e4d548b45b7a1e18 Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 1 Dec 2021 12:30:53 +0100 Subject: [PATCH 7/7] remove --dlsch-parallel --- ci-scripts/xml_files/fr1_sa_oaiue_b200.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml index 030d9a1ab0..486fba3ea5 100644 --- a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml +++ b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml @@ -42,7 +42,7 @@ Initialize_OAI_UE Initialize OAI UE nr - --dlsch-parallel 8 --sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "serial=30C51D1" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 -E + --sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "serial=30C51D1" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 -E