Commit 067a4129 authored by Raphael Defosseux's avatar Raphael Defosseux

CI: minor fixes:

  -- Moved the Gitlab notification within the try:
     As a result, when fails, the notification will be a fail
  -- Changed all exit by return in the runTest script
Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent f83c92d7
...@@ -329,10 +329,11 @@ pipeline { ...@@ -329,10 +329,11 @@ pipeline {
stage ("Test physical simulators") { stage ("Test physical simulators") {
steps { steps {
script { script {
gitlabCommitStatus(name: "Test phy-sim") {
timeout (time: 20, unit: 'MINUTES') { timeout (time: 20, unit: 'MINUTES') {
try { try {
gitlabCommitStatus(name: "Test phy-sim") {
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
}
} catch (Exception e) { } catch (Exception e) {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
} }
...@@ -340,7 +341,6 @@ pipeline { ...@@ -340,7 +341,6 @@ pipeline {
} }
} }
} }
}
stage ("Build Flexran Controller") { stage ("Build Flexran Controller") {
when { when {
expression {doFlexranCtrlTest} expression {doFlexranCtrlTest}
...@@ -360,10 +360,11 @@ pipeline { ...@@ -360,10 +360,11 @@ pipeline {
stage ("Test basic simulator") { stage ("Test basic simulator") {
steps { steps {
script { script {
gitlabCommitStatus(name: "Test basic-sim") {
timeout (time: 30, unit: 'MINUTES') { timeout (time: 30, unit: 'MINUTES') {
try { try {
gitlabCommitStatus(name: "Test basic-sim") {
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}"
}
} catch (Exception e) { } catch (Exception e) {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
} }
...@@ -371,14 +372,14 @@ pipeline { ...@@ -371,14 +372,14 @@ pipeline {
} }
} }
} }
}
stage ("Test L2 simulator") { stage ("Test L2 simulator") {
steps { steps {
script { script {
gitlabCommitStatus(name: "Test L2-sim") {
timeout (time: 30, unit: 'MINUTES') { timeout (time: 30, unit: 'MINUTES') {
try { try {
gitlabCommitStatus(name: "Test L2-sim") {
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant l2-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant l2-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
}
} catch (Exception e) { } catch (Exception e) {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
} }
...@@ -388,7 +389,6 @@ pipeline { ...@@ -388,7 +389,6 @@ pipeline {
} }
} }
} }
}
stage ("Test FDD - Band 7 - B210") { stage ("Test FDD - Band 7 - B210") {
steps { steps {
script { script {
......
...@@ -664,7 +664,7 @@ function run_test_on_vm { ...@@ -664,7 +664,7 @@ function run_test_on_vm {
if [ "$RUN_OPTIONS" == "none" ] if [ "$RUN_OPTIONS" == "none" ]
then then
echo "No run on VM testing for this variant currently" echo "No run on VM testing for this variant currently"
exit $STATUS return
fi fi
if [[ $RUN_OPTIONS =~ .*run_exec_autotests.* ]] if [[ $RUN_OPTIONS =~ .*run_exec_autotests.* ]]
...@@ -823,7 +823,8 @@ function run_test_on_vm { ...@@ -823,7 +823,8 @@ 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
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
exit -1 STATUS=-1
return
fi fi
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
...@@ -882,7 +883,8 @@ function run_test_on_vm { ...@@ -882,7 +883,8 @@ 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
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
exit -1 STATUS=-1
return
fi fi
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
...@@ -941,7 +943,8 @@ function run_test_on_vm { ...@@ -941,7 +943,8 @@ 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
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
exit -1 STATUS=-1
return
fi fi
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
...@@ -993,7 +996,8 @@ function run_test_on_vm { ...@@ -993,7 +996,8 @@ function run_test_on_vm {
echo "ERROR: compiling flexran controller on vm went wrong" echo "ERROR: compiling flexran controller on vm went wrong"
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
exit -1 STATUS=-1
return
fi fi
FLEXRAN_CTL_VM_NAME=`echo $VM_NAME | sed -e "s#basic-sim#flexran-rtc#"` 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#"` FLEXRAN_CTL_VM_CMDS=`echo $VM_CMDS | sed -e "s#cmds#flexran-rtc-cmds#"`
...@@ -1003,7 +1007,8 @@ function run_test_on_vm { ...@@ -1003,7 +1007,8 @@ function run_test_on_vm {
echo "ERROR: Flexran Ctl VM is not alive" echo "ERROR: Flexran Ctl VM is not alive"
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
exit -1 STATUS=-1
return
fi fi
uvt-kvm wait $FLEXRAN_CTL_VM_NAME --insecure uvt-kvm wait $FLEXRAN_CTL_VM_NAME --insecure
FLEXRAN_CTL_VM_IP_ADDR=`uvt-kvm ip $FLEXRAN_CTL_VM_NAME` FLEXRAN_CTL_VM_IP_ADDR=`uvt-kvm ip $FLEXRAN_CTL_VM_NAME`
...@@ -1038,7 +1043,8 @@ function run_test_on_vm { ...@@ -1038,7 +1043,8 @@ function run_test_on_vm {
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
stop_flexran_ctrl $FLEXRAN_CTL_VM_CMDS $FLEXRAN_CTL_VM_IP_ADDR stop_flexran_ctrl $FLEXRAN_CTL_VM_CMDS $FLEXRAN_CTL_VM_IP_ADDR
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
exit -1 STATUS=-1
return
fi fi
query_flexran_ctrl_status $FLEXRAN_CTL_VM_CMDS $FLEXRAN_CTL_VM_IP_ADDR 03_enb_ue_connected 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 get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
...@@ -1080,7 +1086,8 @@ function run_test_on_vm { ...@@ -1080,7 +1086,8 @@ 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
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
exit -1 STATUS=-1
return
fi fi
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
...@@ -1131,7 +1138,8 @@ function run_test_on_vm { ...@@ -1131,7 +1138,8 @@ 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
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
exit -1 STATUS=-1
return
fi fi
get_ue_ip_addr $VM_CMDS $VM_IP_ADDR get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
...@@ -1182,7 +1190,8 @@ function run_test_on_vm { ...@@ -1182,7 +1190,8 @@ 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
# terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR # terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
# echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log # echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
# exit -1 # STATUS=-1
# return
# fi # fi
# get_ue_ip_addr $VM_CMDS $VM_IP_ADDR # get_ue_ip_addr $VM_CMDS $VM_IP_ADDR
# #
...@@ -1294,7 +1303,8 @@ function run_test_on_vm { ...@@ -1294,7 +1303,8 @@ function run_test_on_vm {
scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC scp -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR terminate_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR
echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log
exit -1 STATUS=-1
return
fi fi
echo "############################################################" echo "############################################################"
......
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