Commit 874b2db9 authored by Boris Djalal's avatar Boris Djalal

Test.

Signed-off-by: default avatarBoris Djalal <boris.djalal@eurecom.fr>
parent 3c6ef74e
...@@ -56,7 +56,7 @@ def PROJECT_NAME = "test-boris" ...@@ -56,7 +56,7 @@ def PROJECT_NAME = "test-boris"
def GIT_COMMIT_AUTHORi def GIT_COMMIT_AUTHORi
def GIT_COMMIT_EMAIL def GIT_COMMIT_EMAIL
// Reversing list because pop() will take the last (right-most) element // Reversing list because pop() will take the last (right-most) element
def modeList = ['TesteNB', 'TestUE', 'TesteNB'].reverse() //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"
...@@ -232,14 +232,14 @@ pipeline { ...@@ -232,14 +232,14 @@ pipeline {
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} --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) {
mode = modeList.pop() //mode = modeList.pop()
machine = 'eNB' //machine = 'eNB'
if ( mode == 'TestUE' ) { //if ( mode == 'TestUE' ) {
machine = 'UE' // machine = 'UE'
} //}
if (fileExists(xmlFile)) { if (fileExists(xmlFile)) {
try { try {
sh "python3 main.py --mode=${mode} --${machine}IPAddress=${params.eNB_IPAddress} --${machine}UserName=${eNB_Username} --${machine}Password=${eNB_Password} --eNBBranch=${eNB_Branch} --${machine}SourceCodePath=${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} ---UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} -eNBBranch=${eNB_Branch} --eNBSourceCodePath=${params.eNB_SourceCodePath} ---UESourceCodePath=${params.UE_SourceCodePath} --eNBRepository=${eNB_Repository} --UERepository=${UE_Repository} --eNBCommitID=${eNB_CommitID} --ADBIPAddress=${ADB_IPAddress} --EPCIPAddress=${EPC_IPAddress} --XMLTestFile=${xmlFile}"
} catch (Exception e) { } catch (Exception e) {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
BUILD_STAGE_STATUS = false BUILD_STAGE_STATUS = false
......
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