Commit 41343e71 authored by Raphael Defosseux's avatar Raphael Defosseux

CI: initial testing on FlexRan integration

  -- Connection w/ basic simulator
Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent fb5739dc
...@@ -31,6 +31,7 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) { ...@@ -31,6 +31,7 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
} }
def doRedHatBuild = false def doRedHatBuild = false
def doFlexranCtrlTest = false
pipeline { pipeline {
agent { agent {
...@@ -69,6 +70,12 @@ pipeline { ...@@ -69,6 +70,12 @@ pipeline {
} else { } else {
doRedHatBuild = false doRedHatBuild = false
} }
if (params.FlexRanRtcGitLabRepository_Credentials != null) {
doFlexranCtrlTest = True
}
if (fileExists("flexran")) {
sh "rm -Rf flexran > /dev/null 2>&1"
}
} }
} }
} }
...@@ -103,6 +110,18 @@ pipeline { ...@@ -103,6 +110,18 @@ pipeline {
// For the moment, there is no fail criteria. Just a notification of number of files that do not follow // For the moment, there is no fail criteria. Just a notification of number of files that do not follow
sh "./ci-scripts/checkCodingFormattingRules.sh" sh "./ci-scripts/checkCodingFormattingRules.sh"
} }
if (doFlexranCtrlTest) {
sh "mkdir flexran"
dir ('flexran') {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.FlexRanRtcGitLabRepository_Credentials}", usernameVariable: 'git_username', passwordVariable: 'git_password']
]) {
sh "git clone https://${git_username}:${git_password}@gitlab.eurecom.fr/flexran/flexran-rtc.git . > ../git_clone.log 2>&1"
}
sh "sed -i -e 's#add-apt-repository.*cleishm.*neo4j#add-apt-repository ppa:cleishm/neo4j -y#' -e 's#libneo4j-client-dev#libneo4j-client-dev -y#' tools/install_dependencies"
sh "zip -r -qq flexran.zip ."
}
}
} }
} }
post { post {
...@@ -288,12 +307,22 @@ pipeline { ...@@ -288,12 +307,22 @@ pipeline {
stage ("Test basic simulator") { stage ("Test basic simulator") {
steps { steps {
gitlabCommitStatus(name: "Test basic-sim") { gitlabCommitStatus(name: "Test basic-sim") {
timeout (time: 20, unit: 'MINUTES') { timeout (time: 30, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
} }
} }
} }
} }
stage ("Build Flexran Controller") {
when {
expression {doFlexranCtrlTest}
}
steps {
timeout (time: 20, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant flexran-rtc --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-alive"
}
}
}
stage ("Test FDD - Band 7 - B210") { stage ("Test FDD - Band 7 - B210") {
steps { steps {
script { script {
......
...@@ -106,7 +106,12 @@ function build_on_vm { ...@@ -106,7 +106,12 @@ function build_on_vm {
echo "############################################################" echo "############################################################"
echo "Copying GIT repo into VM ($VM_NAME)" echo "Copying GIT repo into VM ($VM_NAME)"
echo "############################################################" echo "############################################################"
scp -o StrictHostKeyChecking=no $JENKINS_WKSP/localZip.zip ubuntu@$VM_IP_ADDR:/home/ubuntu if [[ "$VM_NAME" == *"-flexran-rtc"* ]]
then
scp -o StrictHostKeyChecking=no $JENKINS_WKSP/flexran/flexran.zip ubuntu@$VM_IP_ADDR:/home/ubuntu/localZip.zip
else
scp -o StrictHostKeyChecking=no $JENKINS_WKSP/localZip.zip ubuntu@$VM_IP_ADDR:/home/ubuntu
fi
scp -o StrictHostKeyChecking=no /etc/apt/apt.conf.d/01proxy ubuntu@$VM_IP_ADDR:/home/ubuntu scp -o StrictHostKeyChecking=no /etc/apt/apt.conf.d/01proxy ubuntu@$VM_IP_ADDR:/home/ubuntu
echo "############################################################" echo "############################################################"
...@@ -126,7 +131,22 @@ function build_on_vm { ...@@ -126,7 +131,22 @@ function build_on_vm {
echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
echo "sudo apt-get --yes install zip daemon cppcheck >> zip-install.txt 2>&1" >> $VM_CMDS echo "sudo apt-get --yes install zip daemon cppcheck >> zip-install.txt 2>&1" >> $VM_CMDS
fi fi
else fi
if [[ "$VM_NAME" == *"-flexran-rtc"* ]]
then
if [ $DAEMON -eq 0 ]
then
echo "echo \"sudo apt-get --yes --quiet install zip curl jq \"" >> $VM_CMDS
echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
echo "sudo apt-get --yes install zip curl jq >> zip-install.txt 2>&1" >> $VM_CMDS
else
echo "echo \"sudo apt-get --yes --quiet install zip daemon curl jq \"" >> $VM_CMDS
echo "sudo apt-get update > zip-install.txt 2>&1" >> $VM_CMDS
echo "sudo apt-get --yes install zip daemon curl jq >> zip-install.txt 2>&1" >> $VM_CMDS
fi
fi
if [[ "$VM_NAME" != *"-cppcheck"* ]] && [[ "$VM_NAME" != *"-flexran-rtc"* ]]
then
if [ $DAEMON -eq 0 ] if [ $DAEMON -eq 0 ]
then then
echo "echo \"sudo apt-get --yes --quiet install zip subversion libboost-dev \"" >> $VM_CMDS echo "echo \"sudo apt-get --yes --quiet install zip subversion libboost-dev \"" >> $VM_CMDS
......
...@@ -237,8 +237,8 @@ THREAD_STRUCT = ( ...@@ -237,8 +237,8 @@ THREAD_STRUCT = (
NETWORK_CONTROLLER : NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "ens3";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -217,8 +217,8 @@ THREAD_STRUCT = ( ...@@ -217,8 +217,8 @@ THREAD_STRUCT = (
NETWORK_CONTROLLER : NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "ens3";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -40,6 +40,7 @@ function variant_usage { ...@@ -40,6 +40,7 @@ function variant_usage {
echo " --variant cppcheck OR -v4" echo " --variant cppcheck OR -v4"
echo " --variant enb-ethernet OR -v7" echo " --variant enb-ethernet OR -v7"
echo " --variant ue-ethernet OR -v8" echo " --variant ue-ethernet OR -v8"
echo " --variant flexran-rtc OR -v10"
} }
MY_DIR=$(dirname $(readlink -f $0)) MY_DIR=$(dirname $(readlink -f $0))
...@@ -284,6 +285,15 @@ case $key in ...@@ -284,6 +285,15 @@ case $key in
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
shift shift
;; ;;
-v10)
VM_NAME=ci-flexran-rtc
ARCHIVES_LOC=flexran
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=1
BUILD_OPTIONS="cmake . && make -j2"
NBARGS=$[$NBARGS+256]
shift
;;
--variant) --variant)
variant="$2" variant="$2"
case $variant in case $variant in
...@@ -340,6 +350,14 @@ case $key in ...@@ -340,6 +350,14 @@ case $key in
BUILD_OPTIONS="--UE -t ETHERNET --noS1" BUILD_OPTIONS="--UE -t ETHERNET --noS1"
NBARGS=$[$NBARGS+256] NBARGS=$[$NBARGS+256]
;; ;;
flexran-rtc)
VM_NAME=ci-flexran-rtc
ARCHIVES_LOC=flexran
LOG_PATTERN=.Rel14.txt
NB_PATTERN_FILES=1
BUILD_OPTIONS="cmake . && make -j2"
NBARGS=$[$NBARGS+256]
;;
*) *)
echo "" echo ""
echo "Syntax Error: Invalid Variant option -> $variant" echo "Syntax Error: Invalid Variant option -> $variant"
......
...@@ -362,6 +362,29 @@ function report_test { ...@@ -362,6 +362,29 @@ function report_test {
echo " </table>" >> ./test_simulator_results.html echo " </table>" >> ./test_simulator_results.html
fi fi
if [ -e $JENKINS_WKSP/flexran/flexran_build_complete.txt ]
then
echo " <h3>Basic Simulator + FlexRan Controller Check</h3>" >> ./test_simulator_results.html
echo " <table border = \"1\">" >> ./test_simulator_results.html
echo " <tr bgcolor = \"#33CCFF\" >" >> ./test_simulator_results.html
echo " <th>Log File Name</th>" >> ./test_simulator_results.html
echo " <th>JSON Query Response</th>" >> ./test_simulator_results.html
echo " </tr>" >> ./test_simulator_results.html
FLEXRAN_QUERIES=`ls $ARCHIVES_LOC/flexran_ctl_query_*log`
for QUERY in $FLEXRAN_QUERIES
do
echo " <tr>" >> ./test_simulator_results.html
NAME=`echo $QUERY | sed -e "s#$ARCHIVES_LOC/##"`
echo " <td>$NAME</td>" >> ./test_simulator_results.html
echo " <td><pre><code>" >> ./test_simulator_results.html
egrep -v "LOG_NAME|\-\-\-\-\-" $QUERY >> ./test_simulator_results.html
echo " </code></pre></td>" >> ./test_simulator_results.html
echo " </tr>" >> ./test_simulator_results.html
done
echo " </table>" >> ./test_simulator_results.html
fi
ARCHIVES_LOC=archives/phy_sim/test ARCHIVES_LOC=archives/phy_sim/test
if [ -d $ARCHIVES_LOC ] if [ -d $ARCHIVES_LOC ]
then then
......
...@@ -61,6 +61,7 @@ function start_basic_sim_enb { ...@@ -61,6 +61,7 @@ function start_basic_sim_enb {
local LOC_LOG_FILE=$4 local LOC_LOG_FILE=$4
local LOC_NB_RBS=$5 local LOC_NB_RBS=$5
local LOC_CONF_FILE=$6 local LOC_CONF_FILE=$6
local LOC_FLEXRAN_CTL_IP_ADRR=$7
echo "cd /home/ubuntu/tmp" > $1 echo "cd /home/ubuntu/tmp" > $1
echo "echo \"sudo apt-get --yes --quiet install daemon \"" >> $1 echo "echo \"sudo apt-get --yes --quiet install daemon \"" >> $1
echo "sudo apt-get --yes install daemon >> /home/ubuntu/tmp/cmake_targets/log/daemon-install.txt 2>&1" >> $1 echo "sudo apt-get --yes install daemon >> /home/ubuntu/tmp/cmake_targets/log/daemon-install.txt 2>&1" >> $1
...@@ -71,6 +72,12 @@ function start_basic_sim_enb { ...@@ -71,6 +72,12 @@ function start_basic_sim_enb {
echo "cd ci-scripts/conf_files/" >> $1 echo "cd ci-scripts/conf_files/" >> $1
echo "cp $LOC_CONF_FILE ci-$LOC_CONF_FILE" >> $1 echo "cp $LOC_CONF_FILE ci-$LOC_CONF_FILE" >> $1
echo "sed -i -e 's#N_RB_DL.*=.*;#N_RB_DL = $LOC_NB_RBS;#' -e 's#CI_MME_IP_ADDR#$LOC_EPC_IP_ADDR#' -e 's#CI_ENB_IP_ADDR#$LOC_VM_IP_ADDR#' ci-$LOC_CONF_FILE" >> $1 echo "sed -i -e 's#N_RB_DL.*=.*;#N_RB_DL = $LOC_NB_RBS;#' -e 's#CI_MME_IP_ADDR#$LOC_EPC_IP_ADDR#' -e 's#CI_ENB_IP_ADDR#$LOC_VM_IP_ADDR#' ci-$LOC_CONF_FILE" >> $1
if [[ $LOC_FLEXRAN_CTL_IP_ADRR =~ .*none.* ]]
then
echo "sed -i -e 's#CI_FLEXRAN_CTL_IP_ADDR#127.0.0.1#' ci-$LOC_CONF_FILE" >> $1
else
echo "sed -i -e 's#FLEXRAN_ENABLED = .*no.*;#FLEXRAN_ENABLED = \"yes\";#' -e 's#CI_FLEXRAN_CTL_IP_ADDR#$LOC_FLEXRAN_CTL_IP_ADRR#' ci-$LOC_CONF_FILE" >> $1
fi
echo "echo \"grep N_RB_DL ci-$LOC_CONF_FILE\"" >> $1 echo "echo \"grep N_RB_DL ci-$LOC_CONF_FILE\"" >> $1
echo "grep N_RB_DL ci-$LOC_CONF_FILE | sed -e 's#N_RB_DL.*=#N_RB_DL =#'" >> $1 echo "grep N_RB_DL ci-$LOC_CONF_FILE | sed -e 's#N_RB_DL.*=#N_RB_DL =#'" >> $1
echo "echo \"cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/\"" >> $1 echo "echo \"cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/\"" >> $1
...@@ -286,6 +293,35 @@ function terminate_ltebox_epc { ...@@ -286,6 +293,35 @@ function terminate_ltebox_epc {
rm $1 rm $1
} }
function start_flexran_ctrl {
echo "cd /home/ubuntu/tmp" > $1
echo "if [ -f cmake_targets/log/flexran_ctl_run.log ]; then rm -f cmake_targets/log/flexran_ctl_run.log cmake_targets/log/flexran_ctl_query*.log; fi" >> $1
echo "echo \" sudo build/rt_controller -c log_config/basic_log\"" >> $1
echo "nohup sudo build/rt_controller -c log_config/basic_log > cmake_targets/log/flexran_ctl_run.log 2>&1 &" >> $1
ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1
rm $1
sleep 10
}
function stop_flexran_ctrl {
echo "echo \"sudo killall --signal SIGKILL rt_controller\"" > $1
echo "sudo killall --signal SIGKILL rt_controller" > $1
ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1
rm $1
sleep 2
}
function query_flexran_ctrl_status {
local LOC_MESSAGE=$3
echo "cd /home/ubuntu/tmp" > $1
echo "echo \"------------------------------------------------------------\" > cmake_targets/log/flexran_ctl_query_${LOC_MESSAGE}.log" >> $1
echo "echo \"LOG_NAME: $LOC_MESSAGE\" >> cmake_targets/log/flexran_ctl_query_${LOC_MESSAGE}.log" >> $1
echo "echo \"------------------------------------------------------------\" >> cmake_targets/log/flexran_ctl_query_${LOC_MESSAGE}.log" >> $1
echo "curl http://localhost:9999/stats | jq '.' | tee -a cmake_targets/log/flexran_ctl_query_${LOC_MESSAGE}.log" >> $1
ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1
rm $1
}
function run_test_on_vm { function run_test_on_vm {
echo "############################################################" echo "############################################################"
echo "OAI CI VM script" echo "OAI CI VM script"
...@@ -564,7 +600,7 @@ function run_test_on_vm { ...@@ -564,7 +600,7 @@ function run_test_on_vm {
echo "Starting the eNB in FDD-5MHz mode" echo "Starting the eNB in FDD-5MHz mode"
echo "############################################################" echo "############################################################"
CURRENT_ENB_LOG_FILE=fdd_05MHz_enb.log CURRENT_ENB_LOG_FILE=fdd_05MHz_enb.log
start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 lte-fdd-basic-sim.conf start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 lte-fdd-basic-sim.conf none
echo "############################################################" echo "############################################################"
echo "Starting the UE in FDD-5MHz mode" echo "Starting the UE in FDD-5MHz mode"
...@@ -622,7 +658,7 @@ function run_test_on_vm { ...@@ -622,7 +658,7 @@ function run_test_on_vm {
echo "Starting the eNB in FDD-10MHz mode" echo "Starting the eNB in FDD-10MHz mode"
echo "############################################################" echo "############################################################"
CURRENT_ENB_LOG_FILE=fdd_10MHz_enb.log CURRENT_ENB_LOG_FILE=fdd_10MHz_enb.log
start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-fdd-basic-sim.conf start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-fdd-basic-sim.conf none
echo "############################################################" echo "############################################################"
echo "Starting the UE in FDD-10MHz mode" echo "Starting the UE in FDD-10MHz mode"
...@@ -680,7 +716,7 @@ function run_test_on_vm { ...@@ -680,7 +716,7 @@ function run_test_on_vm {
echo "Starting the eNB in FDD-20MHz mode" echo "Starting the eNB in FDD-20MHz mode"
echo "############################################################" echo "############################################################"
CURRENT_ENB_LOG_FILE=fdd_20MHz_enb.log CURRENT_ENB_LOG_FILE=fdd_20MHz_enb.log
start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 lte-fdd-basic-sim.conf start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 lte-fdd-basic-sim.conf none
echo "############################################################" echo "############################################################"
echo "Starting the UE in FDD-20MHz mode" echo "Starting the UE in FDD-20MHz mode"
...@@ -725,11 +761,97 @@ function run_test_on_vm { ...@@ -725,11 +761,97 @@ function run_test_on_vm {
recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
sleep 10 sleep 10
if [ -d $JENKINS_WKSP/flexran ]
then
echo "############################################################"
echo "Flexran testing is possible"
echo "############################################################"
local j="0"
while [ $j -lt 20 ]
do
if [ -e $JENKINS_WKSP/flexran/flexran_build_complete.txt ]
then
echo "Found an proper flexran controller vm build"
j="100"
else
j=$[$j+1]
sleep 30
fi
done
if [ $j -lt 50 ]
then
echo "ERROR: compiling flexran controller on vm went wrong"
terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
exit -1
fi
FLEXRAN_CTL_VM_NAME=`echo $VM_NAME | sed -e "s#basic-sim#flexran-rtc#"`
FLEXRAN_CTL_VM_CMDS=`echo $VM_CMDS | sed -e "s#cmds#flexran-rtc-cmds#"`
IS_FLEXRAN_VM_ALIVE=`uvt-kvm list | grep -c $FLEXRAN_CTL_VM_NAME`
if [ $IS_FLEXRAN_VM_ALIVE -eq 0 ]
then
echo "ERROR: Flexran Ctl VM is not alive"
terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
exit -1
fi
uvt-kvm wait $FLEXRAN_CTL_VM_NAME --insecure
FLEXRAN_CTL_VM_IP_ADDR=`uvt-kvm ip $FLEXRAN_CTL_VM_NAME`
echo "$FLEXRAN_CTL_VM_NAME has for IP addr = $FLEXRAN_CTL_VM_IP_ADDR"
echo "FLEXRAN_CTL_VM_CMDS = $FLEXRAN_CTL_VM_CMDS"
echo "############################################################"
echo "Starting the FLEXRAN CONTROLLER"
echo "############################################################"
start_flexran_ctrl $FLEXRAN_CTL_VM_CMDS $FLEXRAN_CTL_VM_IP_ADDR
query_flexran_ctrl_status $FLEXRAN_CTL_VM_CMDS $FLEXRAN_CTL_VM_IP_ADDR 01_no_enb_connected
echo "############################################################"
echo "Starting the eNB in FDD-5MHz mode with Flexran ON"
echo "############################################################"
CURRENT_ENB_LOG_FILE=fdd_05fMHz_enb.log
start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 lte-fdd-basic-sim.conf $FLEXRAN_CTL_VM_IP_ADDR
query_flexran_ctrl_status $FLEXRAN_CTL_VM_CMDS $FLEXRAN_CTL_VM_IP_ADDR 02_enb_connected
echo "############################################################"
echo "Starting the UE in FDD-5MHz mode"
echo "############################################################"
CURRENT_UE_LOG_FILE=fdd_05fMHz_ue.log
start_basic_sim_ue $VM_CMDS $VM_IP_ADDR $CURRENT_UE_LOG_FILE 25 2680
if [ $UE_SYNC -eq 0 ]
then
echo "Problem w/ eNB and UE not syncing"
terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
stop_flexran_ctrl $FLEXRAN_CTL_VM_CMDS $FLEXRAN_CTL_VM_IP_ADDR
exit -1
fi
query_flexran_ctrl_status $FLEXRAN_CTL_VM_CMDS $FLEXRAN_CTL_VM_IP_ADDR 03_enb_ue_connected
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
sleep 30
echo "############################################################"
echo "Terminate enb/ue simulators"
echo "############################################################"
terminate_enb_ue_basic_sim $VM_CMDS $VM_IP_ADDR
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
recover_core_dump $VM_CMDS $VM_IP_ADDR $ARCHIVES_LOC/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
sleep 10
echo "############################################################"
echo "Stopping the FLEXRAN CONTROLLER"
echo "############################################################"
stop_flexran_ctrl $FLEXRAN_CTL_VM_CMDS $FLEXRAN_CTL_VM_IP_ADDR
scp -o StrictHostKeyChecking=no ubuntu@$FLEXRAN_CTL_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/flexran_ctl_*.log $ARCHIVES_LOC
fi
echo "############################################################" echo "############################################################"
echo "Starting the eNB in TDD-5MHz mode" echo "Starting the eNB in TDD-5MHz mode"
echo "############################################################" echo "############################################################"
CURRENT_ENB_LOG_FILE=tdd_05MHz_enb.log CURRENT_ENB_LOG_FILE=tdd_05MHz_enb.log
start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 lte-tdd-basic-sim.conf start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 lte-tdd-basic-sim.conf none
echo "############################################################" echo "############################################################"
echo "Starting the UE in TDD-5MHz mode" echo "Starting the UE in TDD-5MHz mode"
...@@ -779,7 +901,7 @@ function run_test_on_vm { ...@@ -779,7 +901,7 @@ function run_test_on_vm {
echo "Starting the eNB in TDD-10MHz mode" echo "Starting the eNB in TDD-10MHz mode"
echo "############################################################" echo "############################################################"
CURRENT_ENB_LOG_FILE=tdd_10MHz_enb.log CURRENT_ENB_LOG_FILE=tdd_10MHz_enb.log
start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-tdd-basic-sim.conf start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 50 lte-tdd-basic-sim.conf none
echo "############################################################" echo "############################################################"
echo "Starting the UE in TDD-10MHz mode" echo "Starting the UE in TDD-10MHz mode"
...@@ -828,7 +950,7 @@ function run_test_on_vm { ...@@ -828,7 +950,7 @@ function run_test_on_vm {
echo "Starting the eNB in TDD-20MHz mode" echo "Starting the eNB in TDD-20MHz mode"
echo "############################################################" echo "############################################################"
CURRENT_ENB_LOG_FILE=tdd_20MHz_enb.log CURRENT_ENB_LOG_FILE=tdd_20MHz_enb.log
start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 lte-tdd-basic-sim.conf start_basic_sim_enb $VM_CMDS $VM_IP_ADDR $EPC_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 100 lte-tdd-basic-sim.conf none
echo "############################################################" echo "############################################################"
echo "Starting the UE in TDD-20MHz mode" echo "Starting the UE in TDD-20MHz mode"
...@@ -891,6 +1013,11 @@ function run_test_on_vm { ...@@ -891,6 +1013,11 @@ function run_test_on_vm {
ssh-keygen -R $VM_IP_ADDR ssh-keygen -R $VM_IP_ADDR
uvt-kvm destroy $EPC_VM_NAME uvt-kvm destroy $EPC_VM_NAME
ssh-keygen -R $EPC_VM_IP_ADDR ssh-keygen -R $EPC_VM_IP_ADDR
if [ -e $JENKINS_WKSP/flexran/flexran_build_complete.txt ]
then
uvt-kvm destroy $FLEXRAN_CTL_VM_NAME
ssh-keygen -R $FLEXRAN_CTL_VM_IP_ADDR
fi
fi fi
echo "############################################################" echo "############################################################"
......
...@@ -167,4 +167,12 @@ function check_on_vm_build { ...@@ -167,4 +167,12 @@ function check_on_vm_build {
if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]; then STATUS=-1; fi if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]; then STATUS=-1; fi
# If we were building the FlexRan Controller, flag-touch for basic-simulator to continue
if [[ "$VM_NAME" == *"-flexran-rtc"* ]]
then
if [[ $STATUS -eq 0 ]]
then
touch $JENKINS_WKSP/flexran/flexran_build_complete.txt
fi
fi
} }
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