From 5012faa1058ad1ce300a837595c499bb6ff11ab0 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Tue, 4 Dec 2018 16:11:02 +0100 Subject: [PATCH] CI: HTML reporting improvements with bootstrap usage Signed-off-by: Raphael Defosseux --- ci-scripts/buildOnRH.sh | 8 ++- ci-scripts/main.py | 22 ++++--- ci-scripts/reportBuildLocally.sh | 106 +++++++++++++++++++++++-------- ci-scripts/reportTestLocally.sh | 59 ++++++++++++++++- ci-scripts/runTestOnVM.sh | 22 +++++++ ci-scripts/waitBuildOnVM.sh | 13 +++- 6 files changed, 191 insertions(+), 39 deletions(-) diff --git a/ci-scripts/buildOnRH.sh b/ci-scripts/buildOnRH.sh index ce5b24dc49..bb57cde165 100755 --- a/ci-scripts/buildOnRH.sh +++ b/ci-scripts/buildOnRH.sh @@ -198,12 +198,18 @@ do fi done -if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]; then STATUS=-1; fi +if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ] +then + echo "Expecting $NB_PATTERN_FILES log files and found $NB_FOUND_FILES" + STATUS=-1 +fi if [ $STATUS -eq 0 ] then + echo "BUILD_OK" > $ARCHIVES_LOC/build_final_status.log echo "STATUS seems OK" else + echo "BUILD_KO" > $ARCHIVES_LOC/build_final_status.log echo "STATUS failed?" fi exit $STATUS diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 8d5ca76b78..51af244530 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -670,9 +670,9 @@ class SSHConnection(): device_id = status_queue.get() message = status_queue.get() if (count < 0): - html_cell = "
UE (" + device_id + ")\n" + message + "
" + html_cell = '
UE (' + device_id + ')\n' + message + '
' else: - html_cell = "
UE (" + device_id + ")\n" + message + ' in ' + str(count + 2) + ' seconds
' + html_cell = '
UE (' + device_id + ')\n' + message + ' in ' + str(count + 2) + ' seconds
' html_queue.put(html_cell) if (attach_status): self.CreateHtmlTestRowQueue('N/A', 'OK', len(self.UEDevices), html_queue) @@ -955,7 +955,7 @@ class SSHConnection(): device_id = status_queue.get() ip_addr = status_queue.get() message = status_queue.get() - html_cell = "
UE (" + device_id + ")\nIP Address  : " + ip_addr + "\n" + message + "
" + html_cell = '
UE (' + device_id + ')\nIP Address  : ' + ip_addr + '\n' + message + '
' html_queue.put(html_cell) if (ping_status): self.CreateHtmlTestRowQueue(self.ping_args, 'OK', len(self.UEDevices), html_queue) @@ -1438,7 +1438,7 @@ class SSHConnection(): device_id = status_queue.get() ip_addr = status_queue.get() message = status_queue.get() - html_cell = "
UE (" + device_id + ")\nIP Address  : " + ip_addr + "\n" + message + "
" + html_cell = '
UE (' + device_id + ')\nIP Address  : ' + ip_addr + '\n' + message + '
' html_queue.put(html_cell) if (iperf_noperf and iperf_status): self.CreateHtmlTestRowQueue(self.iperf_args, 'PERF NOT MET', len(self.UEDevices), html_queue) @@ -1923,9 +1923,13 @@ class SSHConnection(): self.htmlFile.write('\n') self.htmlFile.write('\n') self.htmlFile.write('\n') + self.htmlFile.write(' \n') + self.htmlFile.write(' \n') + self.htmlFile.write(' \n') + self.htmlFile.write(' \n') self.htmlFile.write(' Test Results for TEMPLATE_JOB_NAME job build #TEMPLATE_BUILD_ID\n') self.htmlFile.write('\n') - self.htmlFile.write('\n') + self.htmlFile.write('
\n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') self.htmlFile.write('
\n') @@ -2016,7 +2020,8 @@ class SSHConnection(): self.htmlFile.write(' FAIL
\n') - self.htmlFile.write('\n') + self.htmlFile.write('
End of Test Report -- Copyright 2018 OpenAirInterface. All Rights Reserved.
\n') + self.htmlFile.write('
\n') self.htmlFile.write('\n') self.htmlFile.close() self.htmlFooterCreated = False @@ -2061,7 +2066,8 @@ class SSHConnection(): result = re.search('showed|Reestablishment', self.htmleNBFailureMsg) if result is not None: cellBgColor = 'orange' - self.htmlFile.write('
' + self.htmleNBFailureMsg + '
\n') + self.htmlFile.write('
' + self.htmleNBFailureMsg + '
\n') self.htmleNBFailureMsg = '' else: i = 0 @@ -2089,7 +2095,7 @@ class SSHConnection(): if (i < ue_status): if (not ue_queue.empty()): if (addOrangeBK): - self.htmlFile.write(' ' + str(ue_queue.get()) + '\n') + self.htmlFile.write(' ' + str(ue_queue.get()).replace('white', 'orange') + '\n') else: self.htmlFile.write(' ' + str(ue_queue.get()) + '\n') else: diff --git a/ci-scripts/reportBuildLocally.sh b/ci-scripts/reportBuildLocally.sh index 1b97841e69..c42ecef00b 100755 --- a/ci-scripts/reportBuildLocally.sh +++ b/ci-scripts/reportBuildLocally.sh @@ -141,6 +141,23 @@ function details_table { function summary_table_header { echo "

$1

" >> ./build_results.html + if [ -f $2/build_final_status.log ] + then + if [ `grep -c BUILD_OK $2/build_final_status.log` -eq 1 ] + then + echo "
" >> ./build_results.html + echo " BUILD was SUCCESSFUL " >> ./build_results.html + echo "
" >> ./build_results.html + else + echo "
" >> ./build_results.html + echo " BUILD was a FAILURE! " >> ./build_results.html + echo "
" >> ./build_results.html + fi + else + echo "
" >> ./build_results.html + echo " COULD NOT DETERMINE BUILD FINAL STATUS! " >> ./build_results.html + echo "
" >> ./build_results.html + fi echo " " >> ./build_results.html echo " " >> ./build_results.html echo " " >> ./build_results.html @@ -198,7 +215,28 @@ function summary_table_footer { } function sca_summary_table_header { - echo "

$1

" >> ./build_results.html + echo "

$2

" >> ./build_results.html + NB_ERRORS=`egrep -c "severity=\"error\"" $1` + NB_WARNINGS=`egrep -c "severity=\"warning\"" $1` + if [ $NB_ERRORS -eq 0 ] && [ $NB_WARNINGS -eq 0 ] + then + echo "
" >> ./build_results.html + echo " CPPCHECK found NO error and NO warning " >> ./build_results.html + echo "
" >> ./build_results.html + else + if [ $NB_ERRORS -eq 0 ] + then + echo "
" >> ./build_results.html + echo " CPPCHECK found NO error and $NB_WARNINGS warnings " >> ./build_results.html + echo "
" >> ./build_results.html + else + echo "
" >> ./build_results.html + echo " CPPCHECK found $NB_ERRORS errors and $NB_WARNINGS warnings " >> ./build_results.html + echo "
" >> ./build_results.html + fi + fi + echo " " >> ./build_results.html + echo "
" >> ./build_results.html echo "
Element
" >> ./build_results.html echo " " >> ./build_results.html echo " " >> ./build_results.html @@ -263,6 +301,7 @@ function sca_summary_table_footer { echo "
Error / Warning Type
" >> ./build_results.html echo "

Full details in zipped artifact (cppcheck/cppcheck.xml)

" >> ./build_results.html echo "

Graphical Interface tool : cppcheck-gui -l cppcheck/cppcheck.xml

" >> ./build_results.html + echo " " >> ./build_results.html } function report_build { @@ -276,10 +315,14 @@ function report_build { echo "" > ./build_results.html echo "" >> ./build_results.html echo "" >> ./build_results.html + echo " " >> ./build_results.html + echo " " >> ./build_results.html + echo " " >> ./build_results.html + echo " " >> ./build_results.html echo " Build Results for $JOB_NAME job build #$BUILD_ID" >> ./build_results.html echo " " >> ./build_results.html echo "" >> ./build_results.html - echo "" >> ./build_results.html + echo "
" >> ./build_results.html echo " " >> ./build_results.html echo " " >> ./build_results.html echo " " >> ./build_results.html; fi - if [ $MR_TRIG -eq 1 ]; then echo " " >> ./build_results.html; fi - echo " " >> ./build_results.html - if [ -f ./oai_rules_result_list.txt ] - then - awk '{print " "}' ./oai_rules_result_list.txt >> ./build_results.html - fi - echo "
" >> ./build_results.html @@ -344,33 +387,38 @@ function report_build { if [ -f ./oai_rules_result.txt ] then echo "

OAI Coding / Formatting Guidelines Check

" >> ./build_results.html - echo " " >> ./build_results.html - echo " " >> ./build_results.html - echo " " >> ./build_results.html NB_FILES=`cat ./oai_rules_result.txt` if [ $NB_FILES = "0" ] then - if [ $PU_TRIG -eq 1 ]; then echo " " >> ./build_results.html; fi - if [ $MR_TRIG -eq 1 ]; then echo " " >> ./build_results.html; fi - echo " " >> ./build_results.html - echo "
Result:All files in repository follow OAI rules. All modified files in Merge-Request follow OAI rules.
" >> ./build_results.html + echo "
" >> ./build_results.html + if [ $PU_TRIG -eq 1 ]; then echo " All files in repository follow OAI rules. " >> ./build_results.html; fi + if [ $MR_TRIG -eq 1 ]; then echo " All modified files in Merge-Request follow OAI rules. " >> ./build_results.html; fi + echo "
" >> ./build_results.html else - if [ $PU_TRIG -eq 1 ]; then echo "
$NB_FILES files in repository DO NOT follow OAI rules. $NB_FILES modified files in Merge-Request DO NOT follow OAI rules.
"$1"
" >> ./build_results.html + echo "
" >> ./build_results.html + if [ $PU_TRIG -eq 1 ]; then echo " $NB_FILES files in repository DO NOT follow OAI rules. " >> ./build_results.html; fi + if [ $MR_TRIG -eq 1 ]; then echo " $NB_FILES modified files in Merge-Request DO NOT follow OAI rules. " >> ./build_results.html; fi + echo "
" >> ./build_results.html + fi + if [ -f ./oai_rules_result_list.txt ] + then + echo " " >> ./build_results.html + echo "
" >> ./build_results.html echo "

Please apply the following command to this(ese) file(s):

" >> ./build_results.html echo "

astyle --options=ci-scripts/astyle-options.txt filename(s)

" >> ./build_results.html + echo " " >> ./build_results.html + echo " " >> ./build_results.html + echo " " >> ./build_results.html + echo " " >> ./build_results.html + awk '{print " "}' ./oai_rules_result_list.txt >> ./build_results.html + echo "
Filename
"$1"
" >> ./build_results.html + echo "
" >> ./build_results.html fi fi echo "

Ubuntu 16.04 LTS -- Summary

" >> ./build_results.html - sca_summary_table_header "OAI Static Code Analysis with CPPCHECK" + sca_summary_table_header ./archives/cppcheck/cppcheck.xml "OAI Static Code Analysis with CPPCHECK" sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Uninitialized variable" uninitvar sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Uninitialized struct member" uninitStructMember sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Memory leak" memleak @@ -382,20 +430,20 @@ function report_build { sca_summary_table_row ./archives/cppcheck/cppcheck.xml "Expression depends on order of evaluation of side effects" unknownEvaluationOrder sca_summary_table_footer ./archives/cppcheck/cppcheck.xml - summary_table_header "OAI Build eNB -- USRP option" + summary_table_header "OAI Build eNB -- USRP option" ./archives/enb_usrp summary_table_row "LTE SoftModem - Release 14" ./archives/enb_usrp/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_row1.html summary_table_row "Coding - Release 14" ./archives/enb_usrp/coding.Rel14.txt "Built target coding" ./enb_usrp_row2.html summary_table_row "OAI USRP device if - Release 14" ./archives/enb_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_row3.html summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_usrp/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_usrp_row4.html summary_table_footer - summary_table_header "OAI Build basic simulator option" + summary_table_header "OAI Build basic simulator option" ./archives/basic_sim summary_table_row "Basic Simulator eNb - Release 14" ./archives/basic_sim/basic_simulator_enb.txt "Built target lte-softmodem" ./basic_sim_row1.html summary_table_row "Basic Simulator UE - Release 14" ./archives/basic_sim/basic_simulator_ue.txt "Built target lte-uesoftmodem" ./basic_sim_row2.html summary_table_row "Conf 2 UE data - Release 14" ./archives/basic_sim/conf2uedata.Rel14.txt "Built target conf2uedata" ./basic_sim_row3.html summary_table_footer - summary_table_header "OAI Build Physical simulators option" + summary_table_header "OAI Build Physical simulators option" ./archives/phy_sim summary_table_row "DL Simulator - Release 14" ./archives/phy_sim/dlsim.Rel14.txt "Built target dlsim" ./phy_sim_row1.html summary_table_row "UL Simulator - Release 14" ./archives/phy_sim/ulsim.Rel14.txt "Built target ulsim" ./phy_sim_row2.html summary_table_row "Coding - Release 14" ./archives/phy_sim/coding.Rel14.txt "Built target coding" ./phy_sim_row3.html @@ -404,7 +452,7 @@ function report_build { if [ -f archives/gnb_usrp/nr-softmodem.Rel14.txt ] then - summary_table_header "OAI Build gNB -- USRP option" + summary_table_header "OAI Build gNB -- USRP option" ./archives/gnb_usrp summary_table_row "LTE SoftModem - Release 14" ./archives/gnb_usrp/nr-softmodem.Rel14.txt "Built target nr-softmodem" ./gnb_usrp_row1.html summary_table_row "Coding - Release 14" ./archives/gnb_usrp/coding.Rel14.txt "Built target coding" ./gnb_usrp_row2.html summary_table_row "OAI USRP device if - Release 14" ./archives/gnb_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./gnb_usrp_row3.html @@ -414,7 +462,7 @@ function report_build { if [ -f archives/nrue_usrp/nr-uesoftmodem.Rel14.txt ] then - summary_table_header "OAI Build 5G NR UE -- USRP option" + summary_table_header "OAI Build 5G NR UE -- USRP option" ./archives/nrue_usrp summary_table_row "UE SoftModem - Release 14" ./archives/nrue_usrp/nr-uesoftmodem.Rel14.txt "Built target nr-uesoftmodem" ./nrue_usrp_row1.html summary_table_row "Coding - Release 14" ./archives/nrue_usrp/coding.Rel14.txt "Built target coding" ./nrue_usrp_row2.html summary_table_row "OAI USRP device if - Release 14" ./archives/nrue_usrp/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./nrue_usrp_row3.html @@ -422,7 +470,7 @@ function report_build { summary_table_footer fi - summary_table_header "OAI Build eNB -- ETHERNET transport option" + summary_table_header "OAI Build eNB -- ETHERNET transport option" ./archives/enb_eth summary_table_row "LTE SoftModem w/o S1 - Release 14" ./archives/enb_eth/lte-softmodem-nos1.Rel14.txt "Built target lte-softmodem" ./enb_eth_row1.html summary_table_row "Coding - Release 14" ./archives/enb_eth/coding.Rel14.txt "Built target coding" ./enb_eth_row2.html summary_table_row "OAI ETHERNET transport - Release 14" ./archives/enb_eth/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./enb_eth_row3.html @@ -431,7 +479,7 @@ function report_build { summary_table_row "NAS Mesh - Release 14" ./archives/enb_eth/nasmesh.Rel14.txt "Built target nasmesh" ./enb_eth_row6.html summary_table_footer - summary_table_header "OAI Build UE -- ETHERNET transport option" + summary_table_header "OAI Build UE -- ETHERNET transport option" ./archives/ue_eth summary_table_row "LTE UE SoftModem w/o S1 - Release 14" ./archives/ue_eth/lte-uesoftmodem-nos1.Rel14.txt "Built target lte-uesoftmodem" ./ue_eth_row1.html summary_table_row "Coding - Release 14" ./archives/ue_eth/coding.Rel14.txt "Built target coding" ./ue_eth_row2.html summary_table_row "OAI ETHERNET transport - Release 14" ./archives/ue_eth/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./ue_eth_row3.html @@ -444,7 +492,7 @@ function report_build { then echo "

Red Hat (CentOS Linux release 7.4.1708) -- Summary

" >> ./build_results.html - summary_table_header "Red Hat -- OAI Build eNB -- USRP option" + summary_table_header "Red Hat -- OAI Build eNB -- USRP option" ./archives/red_hat summary_table_row "LTE SoftModem - Release 14" ./archives/red_hat/lte-softmodem.Rel14.txt "Built target lte-softmodem" ./enb_usrp_rh_row1.html summary_table_row "Coding - Release 14" ./archives/red_hat/coding.Rel14.txt "Built target coding" ./enb_usrp_rh_row2.html summary_table_row "OAI USRP device if - Release 14" ./archives/red_hat/oai_usrpdevif.Rel14.txt "Built target oai_usrpdevif" ./enb_usrp_rh_row3.html @@ -453,6 +501,8 @@ function report_build { fi echo "

Details

" >> ./build_results.html + echo " " >> ./build_results.html + echo "
" >> ./build_results.html for DETAILS_TABLE in `ls ./enb_usrp_row*.html` do @@ -492,6 +542,8 @@ function report_build { fi rm -f ./*_row*.html - echo "" >> ./build_results.html + echo "
" >> ./build_results.html + echo "
End of Build Report -- Copyright 2018 OpenAirInterface. All Rights Reserved.
" >> ./build_results.html + echo "
" >> ./build_results.html echo "" >> ./build_results.html } diff --git a/ci-scripts/reportTestLocally.sh b/ci-scripts/reportTestLocally.sh index 372b949aa8..25dce87e46 100755 --- a/ci-scripts/reportTestLocally.sh +++ b/ci-scripts/reportTestLocally.sh @@ -92,10 +92,14 @@ function report_test { echo "" > ./test_simulator_results.html echo "" >> ./test_simulator_results.html echo "" >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html echo " Simulator Results for $JOB_NAME job build #$BUILD_ID" >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html echo "" >> ./test_simulator_results.html - echo "" >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html echo "
" >> ./test_simulator_results.html @@ -162,6 +166,26 @@ function report_test { then echo "

Basic Simulator Check

" >> ./test_simulator_results.html + if [ -f $ARCHIVES_LOC/test_final_status.log ] + then + if [ `grep -c TEST_OK $ARCHIVES_LOC/test_final_status.log` -eq 1 ] + then + echo "
" >> ./test_simulator_results.html + echo " TEST was SUCCESSFUL " >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html + else + echo "
" >> ./test_simulator_results.html + echo " TEST was a FAILURE! " >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html + fi + else + echo "
" >> ./test_simulator_results.html + echo " COULD NOT DETERMINE TEST FINAL STATUS! " >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html + fi + + echo " " >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html @@ -360,11 +384,17 @@ function report_test { done echo "
Log File Name
" >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html fi if [ -e $JENKINS_WKSP/flexran/flexran_build_complete.txt ] then echo "

Basic Simulator + FlexRan Controller Check

" >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html + echo " TEST was SUCCESSFUL " >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html + echo " " >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html @@ -383,6 +413,7 @@ function report_test { echo " " >> ./test_simulator_results.html done echo "
Log File Name
" >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html fi ARCHIVES_LOC=archives/phy_sim/test @@ -390,6 +421,24 @@ function report_test { then echo "

Physical Simulators Check

" >> ./test_simulator_results.html + if [ -f $ARCHIVES_LOC/test_final_status.log ] + then + if [ `grep -c TEST_OK $ARCHIVES_LOC/test_final_status.log` -eq 1 ] + then + echo "
" >> ./test_simulator_results.html + echo " TEST was SUCCESSFUL " >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html + else + echo "
" >> ./test_simulator_results.html + echo " TEST was a FAILURE! " >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html + fi + else + echo "
" >> ./test_simulator_results.html + echo " COULD NOT DETERMINE TEST FINAL STATUS! " >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html + fi + echo " " >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html echo " " >> ./test_simulator_results.html @@ -422,6 +471,10 @@ function report_test { done echo "
Log File Name
" >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html + + echo " " >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html echo "

Details

" >> ./test_simulator_results.html for XML_FILE in $XML_TESTS @@ -472,6 +525,8 @@ function report_test { done fi - echo "" >> ./test_simulator_results.html + echo "
" >> ./test_simulator_results.html + echo "
End of Test Report -- Copyright 2018 OpenAirInterface. All Rights Reserved.
" >> ./test_simulator_results.html + echo "" >> ./test_simulator_results.html echo "" >> ./test_simulator_results.html } diff --git a/ci-scripts/runTestOnVM.sh b/ci-scripts/runTestOnVM.sh index 40ea22d853..3878d2e36f 100755 --- a/ci-scripts/runTestOnVM.sh +++ b/ci-scripts/runTestOnVM.sh @@ -441,6 +441,12 @@ function run_test_on_vm { if [ $NB_RUNS -eq 0 ]; then STATUS=-1; fi if [ $NB_FAILURES -ne 0 ]; then STATUS=-1; fi + if [ $STATUS -eq 0 ] + then + echo "TEST_OK" > $ARCHIVES_LOC/test_final_status.log + else + echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log + fi fi if [[ "$RUN_OPTIONS" == "complex" ]] && [[ $VM_NAME =~ .*-basic-sim.* ]] @@ -580,6 +586,7 @@ function run_test_on_vm { if [ $i -lt 50 ] then echo "Problem w/ starting ltebox EPC" + echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log exit -1 fi fi @@ -615,6 +622,7 @@ 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 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 + echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log exit -1 fi get_ue_ip_addr $VM_CMDS $VM_IP_ADDR @@ -673,6 +681,7 @@ 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 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 + echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log exit -1 fi get_ue_ip_addr $VM_CMDS $VM_IP_ADDR @@ -731,6 +740,7 @@ 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 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 + echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log exit -1 fi get_ue_ip_addr $VM_CMDS $VM_IP_ADDR @@ -782,6 +792,7 @@ function run_test_on_vm { then echo "ERROR: compiling flexran controller on vm went wrong" terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR + echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log exit -1 fi FLEXRAN_CTL_VM_NAME=`echo $VM_NAME | sed -e "s#basic-sim#flexran-rtc#"` @@ -791,6 +802,7 @@ function run_test_on_vm { then echo "ERROR: Flexran Ctl VM is not alive" terminate_ltebox_epc $EPC_VM_CMDS $EPC_VM_IP_ADDR + echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log exit -1 fi uvt-kvm wait $FLEXRAN_CTL_VM_NAME --insecure @@ -825,6 +837,7 @@ function run_test_on_vm { 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 + echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log exit -1 fi query_flexran_ctrl_status $FLEXRAN_CTL_VM_CMDS $FLEXRAN_CTL_VM_IP_ADDR 03_enb_ue_connected @@ -866,6 +879,7 @@ 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 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 + echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log exit -1 fi get_ue_ip_addr $VM_CMDS $VM_IP_ADDR @@ -916,6 +930,7 @@ 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 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 + echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log exit -1 fi get_ue_ip_addr $VM_CMDS $VM_IP_ADDR @@ -965,6 +980,7 @@ 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 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 + echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log exit -1 fi get_ue_ip_addr $VM_CMDS $VM_IP_ADDR @@ -1027,5 +1043,11 @@ function run_test_on_vm { if [ $PING_STATUS -ne 0 ]; then STATUS=-1; fi if [ $IPERF_STATUS -ne 0 ]; then STATUS=-1; fi + if [ $STATUS -eq 0 ] + then + echo "TEST_OK" > $ARCHIVES_LOC/test_final_status.log + else + echo "TEST_KO" > $ARCHIVES_LOC/test_final_status.log + fi fi } diff --git a/ci-scripts/waitBuildOnVM.sh b/ci-scripts/waitBuildOnVM.sh index e39e03702f..21a2f7a9e1 100755 --- a/ci-scripts/waitBuildOnVM.sh +++ b/ci-scripts/waitBuildOnVM.sh @@ -165,7 +165,11 @@ function check_on_vm_build { fi done - if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]; then STATUS=-1; fi + if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ] + then + echo "Expecting $NB_PATTERN_FILES log files and found $NB_FOUND_FILES" + STATUS=-1 + fi # If we were building the FlexRan Controller, flag-touch for basic-simulator to continue if [[ "$VM_NAME" == *"-flexran-rtc"* ]] @@ -175,4 +179,11 @@ function check_on_vm_build { touch $JENKINS_WKSP/flexran/flexran_build_complete.txt fi fi + + if [[ $STATUS -eq 0 ]] + then + echo "BUILD_OK" > $ARCHIVES_LOC/build_final_status.log + else + echo "BUILD_KO" > $ARCHIVES_LOC/build_final_status.log + fi }