Commit 9881036c authored by Raphael Defosseux's avatar Raphael Defosseux

CI: fixing the CI 5G-NR job

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 26f1e090
...@@ -51,14 +51,10 @@ def eNB_Repository ...@@ -51,14 +51,10 @@ def eNB_Repository
def eNB_Branch def eNB_Branch
def eNB_CommitID def eNB_CommitID
def eNB_AllowMergeRequestProcess = false def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch def eNB_TargetBranch = "develop-nr"
def PROJECT_NAME = "test-boris" def GIT_COMMIT_AUTHOR
def GIT_COMMIT_AUTHORi
def GIT_COMMIT_EMAIL def GIT_COMMIT_EMAIL
def testStageName def testStageName
// Reversing list because pop() will take the last (right-most) element
//def modeList = ['TesteNB', 'TestUE', 'TesteNB'].reverse()
// Global Parameters not to break the main.py command line and code. // Global Parameters not to break the main.py command line and code.
def ADB_IPAddress = "none" def ADB_IPAddress = "none"
def ADB_Username = "none" def ADB_Username = "none"
...@@ -201,12 +197,12 @@ pipeline { ...@@ -201,12 +197,12 @@ pipeline {
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'], [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'] [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
]) { ]) {
sh "python3 main.py --mode=InitiateHtml --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --ADBIPAddress=${ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} ${mainPythonAllXmlFiles}" sh "python3 main.py --mode=InitiateHtml --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) { for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) { if (fileExists(xmlFile)) {
try { try {
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --UEIPAddress=${params.eNB_IPAddress} --UEUserName=${eNB_Username} --UEPassword=${eNB_Password} --eNBBranch=${eNB_Branch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --UESourceCodePath=${params.eNB_SourceCodePath} --eNBRepository=${eNB_Repository} --eNBCommitID=${eNB_CommitID} --ADBIPAddress=${ADB_IPAddress} --EPCIPAddress=${EPC_IPAddress} --XMLTestFile=${xmlFile}" sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --UEIPAddress=${params.eNB_IPAddress} --UEUserName=${eNB_Username} --UEPassword=${eNB_Password} --UESourceCodePath=${params.eNB_SourceCodePath} --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --EPCIPAddress=${EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=/tmp/${EPC_Username} --EPCType=ltebox --XMLTestFile=${xmlFile}"
} catch (Exception e) { } catch (Exception e) {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
buildStageStatus = false buildStageStatus = false
......
...@@ -175,7 +175,6 @@ class SSHConnection(): ...@@ -175,7 +175,6 @@ class SSHConnection():
self.UELogFile = '' self.UELogFile = ''
self.Build_OAI_UE_args = '' self.Build_OAI_UE_args = ''
self.Initialize_OAI_UE_args = '' self.Initialize_OAI_UE_args = ''
self.Initialize_OAI_eNB_args = ''
self.clean_repository = True self.clean_repository = True
self.flexranCtrlInstalled = False self.flexranCtrlInstalled = False
self.flexranCtrlStarted = False self.flexranCtrlStarted = False
...@@ -762,13 +761,18 @@ class SSHConnection(): ...@@ -762,13 +761,18 @@ class SSHConnection():
self.command('echo "ulimit -c unlimited && ./ran_build/build/' + self.air_interface + '-softmodem -O ' + lSourcePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5) self.command('echo "ulimit -c unlimited && ./ran_build/build/' + self.air_interface + '-softmodem -O ' + lSourcePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
self.command('chmod 775 ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5) self.command('chmod 775 ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
self.command('echo ' + lPassWord + ' | sudo -S rm -Rf enb_' + self.testCase_id + '.log', '\$', 5) self.command('echo ' + lPassWord + ' | sudo -S rm -Rf enb_' + self.testCase_id + '.log', '\$', 5)
self.command('echo ' + lPassWord + ' | sudo -S -E daemon --inherit --unsafe --name=enb' + str(self.eNB_instance) + '_daemon --chdir=' + lSourcePath + '/cmake_targets -o ' + lSourcePath + '/cmake_targets/enb_' + self.testCase_id + '.log ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5) self.command('hostnamectl','\$', 5)
result = re.search('CentOS Linux 7', str(self.ssh.before))
if result is not None:
self.command('echo $USER; nohup sudo ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh > ' + lSourcePath + '/cmake_targets/enb_' + self.testCase_id + '.log 2>&1 &', lUserName, 10)
else:
self.command('echo ' + lPassWord + ' | sudo -S -E daemon --inherit --unsafe --name=enb' + str(self.eNB_instance) + '_daemon --chdir=' + lSourcePath + '/cmake_targets -o ' + lSourcePath + '/cmake_targets/enb_' + self.testCase_id + '.log ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
self.eNBLogFiles[int(self.eNB_instance)] = 'enb_' + self.testCase_id + '.log' self.eNBLogFiles[int(self.eNB_instance)] = 'enb_' + self.testCase_id + '.log'
if extra_options != '': if extra_options != '':
self.eNBOptions[int(self.eNB_instance)] = extra_options self.eNBOptions[int(self.eNB_instance)] = extra_options
time.sleep(6) time.sleep(6)
doLoop = True doLoop = True
loopCounter = 10 loopCounter = 20
while (doLoop): while (doLoop):
loopCounter = loopCounter - 1 loopCounter = loopCounter - 1
if (loopCounter == 0): if (loopCounter == 0):
...@@ -2557,7 +2561,8 @@ class SSHConnection(): ...@@ -2557,7 +2561,8 @@ class SSHConnection():
multi_jobs = [] multi_jobs = []
status_queue = SimpleQueue() status_queue = SimpleQueue()
# in noS1 config, no need to check status from EPC # in noS1 config, no need to check status from EPC
result = re.search('noS1', str(self.Initialize_eNB_args)) # in gNB also currently no need to check
result = re.search('noS1|band78', str(self.Initialize_eNB_args))
if result is None: if result is None:
p = Process(target = SSH.CheckHSSProcess, args = (status_queue,)) p = Process(target = SSH.CheckHSSProcess, args = (status_queue,))
p.daemon = True p.daemon = True
......
...@@ -25,14 +25,14 @@ ...@@ -25,14 +25,14 @@
<htmlTabName>run OAI gNB and OAI NR UE USRP</htmlTabName> <htmlTabName>run OAI gNB and OAI NR UE USRP</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
090101 000001 090102 000002 090108 090109 090101
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="090101"> <testCase id="090101">
<class>Initialize_OAI_eNB</class> <class>Initialize_eNB</class>
<desc>Initialize gNB USRP</desc> <desc>Initialize gNB USRP</desc>
<Initialize_OAI_eNB_args>-O ../../../ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf</Initialize_OAI_eNB_args> <Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf</Initialize_eNB_args>
<air_interface>NR</air_interface> <air_interface>NR</air_interface>
</testCase> </testCase>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment