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: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
@@ -329,13 +329,13 @@ 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) {
|
|
||||||
currentBuild.result = 'FAILURE'
|
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -360,13 +360,13 @@ 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) {
|
|
||||||
currentBuild.result = 'FAILURE'
|
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -375,13 +375,13 @@ 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) {
|
|
||||||
currentBuild.result = 'FAILURE'
|
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+21
-11
@@ -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 {
|
|||||||
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 {
|
|||||||
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 {
|
|||||||
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 {
|
|||||||
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 {
|
|||||||
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 {
|
|||||||
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 {
|
|||||||
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 {
|
|||||||
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 {
|
|||||||
# 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 {
|
|||||||
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 "############################################################"
|
||||||
|
|||||||
Reference in New Issue
Block a user