Commit 58fa110a authored by Rohit Gupta's avatar Rohit Gupta

installer support in Gitlab CI

parent 24d24f12
...@@ -1123,6 +1123,7 @@ flag_remove_logdir=False ...@@ -1123,6 +1123,7 @@ flag_remove_logdir=False
flag_start_testcase=False flag_start_testcase=False
nruns_lte_softmodem='' nruns_lte_softmodem=''
flag_skip_git_head_check=False flag_skip_git_head_check=False
flag_skip_oai_install=False
Timeout_cmd='' Timeout_cmd=''
print "Number of arguments argc = " + str(len(sys.argv)) print "Number of arguments argc = " + str(len(sys.argv))
#for index in range(1,len(sys.argv) ): #for index in range(1,len(sys.argv) ):
...@@ -1182,6 +1183,8 @@ while i < len (sys.argv): ...@@ -1182,6 +1183,8 @@ while i < len (sys.argv):
elif arg == '--timeout_cmd': elif arg == '--timeout_cmd':
Timeout_cmd = sys.argv[i+1] Timeout_cmd = sys.argv[i+1]
i = i +1 i = i +1
elif arg == '--skip-oai-install':
flag_skip_oai_install=True
elif arg == '-h' : elif arg == '-h' :
print "-s: This flag *MUST* be set to start the test cases" print "-s: This flag *MUST* be set to start the test cases"
print "-r: Remove the log directory in autotests" print "-r: Remove the log directory in autotests"
...@@ -1197,6 +1200,7 @@ while i < len (sys.argv): ...@@ -1197,6 +1200,7 @@ while i < len (sys.argv):
print "-MachineListGeneric : overrides the MachineListGeneric parameter in test_case_list.xml" print "-MachineListGeneric : overrides the MachineListGeneric parameter in test_case_list.xml"
print "--skip-git-head-check: skip checking of GitHead remote/local branch (only for debugging)" print "--skip-git-head-check: skip checking of GitHead remote/local branch (only for debugging)"
print "--timeout_cmd: Override the default parameter (timeout_cmd) in test_case_list.xml. This parameter is in seconds and should be > 120" print "--timeout_cmd: Override the default parameter (timeout_cmd) in test_case_list.xml. This parameter is in seconds and should be > 120"
print "--skip-oai-install: Skips the openairinterface5g installer"
sys.exit() sys.exit()
else : else :
print "Unrecongnized Option: <" + arg + ">. Use -h to see valid options" print "Unrecongnized Option: <" + arg + ">. Use -h to see valid options"
...@@ -1405,6 +1409,17 @@ for oai in oai_list: ...@@ -1405,6 +1409,17 @@ for oai in oai_list:
else: else:
cmd = cmd + 'if [ \"$git_head\" != \"'+ GitOAI5GHeadVersion + '\" ]; then echo \"error: Git openairinterface5g head version does not match\" ; fi \n' cmd = cmd + 'if [ \"$git_head\" != \"'+ GitOAI5GHeadVersion + '\" ]; then echo \"error: Git openairinterface5g head version does not match\" ; fi \n'
cmd = cmd + 'source oaienv' + '\n' cmd = cmd + 'source oaienv' + '\n'
if flag_skip_oai_install == False:
cmd = cmd + 'source $OPENAIR_DIR/cmake_targets/tools/build_helper \n'
cmd = cmd + 'echo \"Installing core OAI dependencies...Start\" \n'
cmd = cmd + '$OPENAIR_DIR/cmake_targets/build_oai -I --install-optional-packages \n'
cmd = cmd + 'echo \"Installing core OAI dependencies...Finished\" \n'
cmd = cmd + 'echo \"Installing BLADERF OAI dependencies...Start\" \n'
cmd = cmd + 'check_install_bladerf_driver \n'
cmd = cmd + 'echo \"Installing BLADERF OAI dependencies...Finished\" \n'
cmd = cmd + 'echo \"Installing USRP OAI dependencies...Start\" \n'
cmd = cmd + 'check_install_usrp_uhd_driver \n'
cmd = cmd + 'echo \"Installing USRP OAI dependencies...Finished\" \n'
cmd = cmd + 'cd ' + logdirOpenaircnRepo + '\n' cmd = cmd + 'cd ' + logdirOpenaircnRepo + '\n'
cmd = cmd + 'git checkout ' + GitOpenaircnRepoBranch + '\n' cmd = cmd + 'git checkout ' + GitOpenaircnRepoBranch + '\n'
cmd = cmd + 'env |grep OPENAIR' + '\n' cmd = cmd + 'env |grep OPENAIR' + '\n'
...@@ -1413,7 +1428,7 @@ for oai in oai_list: ...@@ -1413,7 +1428,7 @@ for oai in oai_list:
#cmd = cmd + 'echo \' ' + cmd + '\' > ' + setup_script + ' 2>&1 \n ' #cmd = cmd + 'echo \' ' + cmd + '\' > ' + setup_script + ' 2>&1 \n '
#result = oai_list[index].send_recv(cmd, False, 300 ) #result = oai_list[index].send_recv(cmd, False, 300 )
write_file(setup_script, cmd, mode="w") write_file(setup_script, cmd, mode="w")
tempThread = oaiThread(index, 'thread_setup_'+str(index)+'_' + MachineList[index] , MachineList[index] , user, pw, cmd, False, 300) tempThread = oaiThread(index, 'thread_setup_'+str(index)+'_' + MachineList[index] , MachineList[index] , user, pw, cmd, False, 3000)
threads_init_setup.append(tempThread ) threads_init_setup.append(tempThread )
tempThread.start() tempThread.start()
index = index + 1 index = index + 1
...@@ -1461,7 +1476,7 @@ status, out = commands.getstatusoutput('grep ' + ' -il \'error\' ' + locallogdi ...@@ -1461,7 +1476,7 @@ status, out = commands.getstatusoutput('grep ' + ' -il \'error\' ' + locallogdi
if (out != '') : if (out != '') :
print "There is error in setup of machines" print "There is error in setup of machines"
print "status = " + str(status) + "\n Check files for error = " + out print "status = " + str(status) + "\n Check files for error = " + out
print sys.exit(1) print "Continuing..."
cleanOldProgramsAllMachines(oai_list, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop) cleanOldProgramsAllMachines(oai_list, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop)
if cleanUpRemoteMachines == True: if cleanUpRemoteMachines == True:
......
...@@ -5551,10 +5551,10 @@ ...@@ -5551,10 +5551,10 @@
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 1 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth5\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth6\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth5\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth6\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.111/24\"
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rrh_gw_config "local_if_name=\"eth0\";remote_address=\"10:60:4b:75:80:83\";local_address=\"98:90:96:df:66:07\";local_port=50000;remote_port=50000;tr_preference=\"raw\";rf_preference=\"usrp_b200\";iq_txshift=5;tx_sample_advance=70;tx_scheduling_advance=9;"</eNB_config_file> targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rrh_gw_config "local_if_name=\"eth0\";remote_address=\"10:60:4b:75:80:83\";local_address=\"98:90:96:df:66:07\";local_port=50000;remote_port=50000;tr_preference=\"raw\";rf_preference=\"usrp_b200\";iq_txshift=5;tx_sample_advance=70;tx_scheduling_advance=9;"</eNB_config_file>
......
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