From a16127e85c02e5f4ecb144922f18e8c9e3c6ed32 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Thu, 28 Apr 2016 14:48:55 +0200 Subject: [PATCH 1/4] log test cases being executed in Gitlab CI --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8947453454..d4377fc324 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,7 @@ job1: - echo $NFS_SHARE_DIR - echo $EXTERNAL_SHARE_DIR - echo $SHELL + - echo $OAI_TEST_CASE_GROUP - git rev-parse --abbrev-ref HEAD - git_repo=`git config --get remote.origin.url` - git_head=`git rev-parse HEAD` From e47ee57d24c842f87214d4c208ddb251cab9fc51 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Fri, 29 Apr 2016 15:32:10 +0200 Subject: [PATCH 2/4] addding LMSSDR into the testbench --- cmake_targets/autotests/test_case_list.xml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 4aaf84e2b9..80a54947b8 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -10,7 +10,7 @@ sudo -S -E /opt/ltebox/tools/stop_ltebox $OPENAIR_DIR/cmake_targets/build_oai -w EXMIMO -c; sudo -S -E $OPENAIR_DIR/cmake_targets/tools/stop_exmimo2; sudo -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_huaweiE398_ue.py --stop-ue; sudo -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue; sudo -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_sony_experia_m4_ue.py --stop-ue; uname -a; sudo -E dmesg|tail 36000 - 0102+ 010304 010305 0104+ 015502 015505 015506 015507 015508 015509 015510 015511 015602 015605 015702 015705 015802 015805 016102 016105 016502 016505 0170+ 017502 017505 018002 018005 018502 018505 025502 025505 + 0102+ 010304 010305 0104+ 015502 015505 015506 015507 015508 015509 015510 015511 015602 015605 015702 015705 015802 015805 016102 016105 016502 016505 017002 017005 017502 017505 018002 018005 018502 018505 025502 025505 3 mozart calisson stevens nano amerique @@ -5090,7 +5090,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem - -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_5MHz_rx19dB_txfull.ini -W @@ -5130,7 +5130,7 @@ throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec False - SoDeRa.ALU_EPC.Bandrich.5MHz.FDD.Band_7.UL.1TX.1RX + LMSSDR.ALU_EPC.Bandrich.5MHz.FDD.Band_7.UL.1TX.1RX 10 @@ -5166,7 +5166,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem - -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_10MHz_rx19dB_txfull.ini -W @@ -5206,7 +5206,7 @@ throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec False - SoDeRa.ALU_EPC.Bandrich.10MHz.FDD.Band_7.UL.1TX.1RX + LMSSDR.ALU_EPC.Bandrich.10MHz.FDD.Band_7.UL.1TX.1RX 10 @@ -5241,7 +5241,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem - -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_20MHz_rx19dB_txfull.ini @@ -5281,7 +5281,7 @@ throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec False - SoDeRa.ALU_EPC.Bandrich.20MHz.FDD.Band_7.UL.1TX.1RX + LMSSDR.ALU_EPC.Bandrich.20MHz.FDD.Band_7.UL.1TX.1RX 10 @@ -5316,7 +5316,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem - -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_5MHz_rx19dB_txfull.ini @@ -5355,7 +5355,7 @@ False - BladeRF.ALU_EPC.Bandrich.5MHz.FDD.Band_7.DL.1TX.1RX + LMSSDR.ALU_EPC.Bandrich.5MHz.FDD.Band_7.DL.1TX.1RX 10 @@ -5390,7 +5390,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem - -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_10MHz_rx19dB_txfull.ini @@ -5464,7 +5464,7 @@ $OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem - -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_20MHz_rx19dB_txfull.ini From 8ada7ce50108f943a90b8b4ffbc365ef95843622 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Mon, 2 May 2016 12:24:56 +0200 Subject: [PATCH 3/4] update for Gitlab CI to detect failed machines --- .../autotests/run_exec_lte-softmodem_tests.py | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py index f1c165acbf..4893d199b5 100755 --- a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py +++ b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py @@ -321,13 +321,19 @@ def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop): print "Killing old programs..." + result programArray = programList.split() programListJoin = '|'.join(programArray) + cmd = " ( date ;echo \"Starting cleaning old programs.. \" ; dmesg|tail )>& $HOME/.oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync" + result=oai.send_recv(cmd) cmd = cleanupOldProgramsScript + ' ' + '\''+programListJoin+'\'' #result = oai.send_recv(cmd) #print result result = oai.send_expect_false(cmd, 'Match found', False) print "Looking for old programs..." + result res=oai.send_recv(CleanUpAluLteBox, True) - res = oai.send_recv(ExmimoRfStop, False) + cmd = "( " + ExmimoRfStop + " ) >> $HOME/.oai_test_setup_cleanup.log.`hostname` ; sync " + res=oai.send_recv(cmd, False) + #res = oai.send_recv(ExmimoRfStop, False) + cmd = " ( date ;echo \"Finished cleaning old programs.. \" ; dmesg | tail)>> $HOME/.oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync" + res=oai.send_recv(cmd) # \brief Class thread to launch a generic command on remote machine # \param threadID number of thread (for book keeping) @@ -1514,6 +1520,22 @@ for testcase in testcaseList: threadListGlobal = wait_testcaseclass_generic_threads(threadListGlobal, Timeout_execution) #cleanOldProgramsAllMachines(oai_list, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop) handle_testcaseclass_softmodem (testcase, CleanUpOldProgs, logdirOAI5GRepo, logdirOpenaircnRepo, MachineList, user, pw, CleanUpAluLteBox, ExmimoRfStop, nruns_lte_softmodem, Timeout_cmd ) + + #The lines below are copied from below to trace the failure of some of the machines in test setup. These lines below need to be removed in long term + print "Creating xml file for overall results..." + cmd = "cat $OPENAIR_DIR/cmake_targets/autotests/log/*/*.xml > $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml " + res=os.system(cmd) + + print "Now copying files to NFS Share" + oai_localhost = openair('localdomain','localhost') + oai_localhost.connect(user,pw) + tlocaldir = locallogdir + '/' + testcasename + tremotedir = NFSTestsResultsDir + '/log' + cmd = ' mkdir -p ' + tremotedir + ' ; rm -fr ' + tremotedir + '/' + testcasename + res = oai_localhost.send_recv(cmd) + print "Copying files from GilabCI Runner Machine : " + host + " .tlocallogdir = " + tlocaldir + ", tremotedir = " + tremotedir + SSHSessionWrapper('localhost', user, None, pw , tremotedir , tlocaldir, "put_all") + elif (testcaseclass == 'compilation'): threadListGlobal = handle_testcaseclass_generic (testcasename, threadListGlobal, CleanUpOldProgs, logdirOAI5GRepo, MachineListGeneric, user, pw, CleanUpAluLteBox,Timeout_execution, ExmimoRfStop) elif (testcaseclass == 'execution'): From 3aab3bfa26660c3df00e8dd1432821fa563d26a5 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Mon, 2 May 2016 14:25:49 +0200 Subject: [PATCH 4/4] update for Gitlab CI to detect failed machines --- .../autotests/run_exec_lte-softmodem_tests.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py index 4893d199b5..159f1df412 100755 --- a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py +++ b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py @@ -1525,16 +1525,17 @@ for testcase in testcaseList: print "Creating xml file for overall results..." cmd = "cat $OPENAIR_DIR/cmake_targets/autotests/log/*/*.xml > $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml " res=os.system(cmd) - + os.system('sync') print "Now copying files to NFS Share" oai_localhost = openair('localdomain','localhost') oai_localhost.connect(user,pw) - tlocaldir = locallogdir + '/' + testcasename - tremotedir = NFSTestsResultsDir + '/log' - cmd = ' mkdir -p ' + tremotedir + ' ; rm -fr ' + tremotedir + '/' + testcasename + cmd = ' rm -fr ' + NFSTestsResultsDir + ' ; mkdir -p ' + NFSTestsResultsDir res = oai_localhost.send_recv(cmd) - print "Copying files from GilabCI Runner Machine : " + host + " .tlocallogdir = " + tlocaldir + ", tremotedir = " + tremotedir - SSHSessionWrapper('localhost', user, None, pw , tremotedir , tlocaldir, "put_all") + print "Deleting NFSTestResults Dir..." + res + + print "Copying files from GilabCI Runner Machine : " + host + " .locallogdir = " + locallogdir + ", NFSTestsResultsDir = " + NFSTestsResultsDir + SSHSessionWrapper('localhost', user, None, pw , NFSTestsResultsDir , locallogdir, "put_all") + oai_localhost.disconnect() elif (testcaseclass == 'compilation'): threadListGlobal = handle_testcaseclass_generic (testcasename, threadListGlobal, CleanUpOldProgs, logdirOAI5GRepo, MachineListGeneric, user, pw, CleanUpAluLteBox,Timeout_execution, ExmimoRfStop) @@ -1573,5 +1574,6 @@ print "Deleting NFSTestResults Dir..." + res print "Copying files from GilabCI Runner Machine : " + host + " .locallogdir = " + locallogdir + ", NFSTestsResultsDir = " + NFSTestsResultsDir SSHSessionWrapper('localhost', user, None, pw , NFSTestsResultsDir , locallogdir, "put_all") +oai_localhost.disconnect() sys.exit()