Commit 9ea7df92 authored by Remi Hardy's avatar Remi Hardy

func + log update of fr1 nsa test

parent ef49960a
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 7 23:04:51 2020
@author: hardy
"""
import yaml
import sys
import subprocess
def main():
f_yaml=sys.argv[1]
f_sh=sys.argv[2]
#filename='py_params_template.yaml'
with open(f_yaml,'r') as file:
# The FullLoader parameter handles the conversion from YAML
# scalar values to Python the dictionary format
print('Loading '+f_yaml)
params = yaml.load(file,Loader=yaml.FullLoader)
with open(f_sh,'w') as f:
f.write('#!/bin/sh\n')
for i in range (0, len(params['steps'])):
step=params['steps'][i].split(',')
mode=step[0]
f_xml=step[1]
line='python3 main.py ' + \
'--mode='+ mode + ' ' + \
'--ranRepository=' + params['ranRepository'] + ' ' + \
'--ranBranch=' + params['ranBranch'] + ' ' + \
'--ranCommitID=' + params['ranCommitID'] + ' ' + \
'--ranAllowMerge=' + params['ranAllowMerge'] + ' ' + \
'--ranTargetBranch=' + params['ranTargetBranch'] + ' ' + \
\
'--ADBIPAddress=' + params['ADB']['ADBIPAddress'] + ' ' + \
'--ADBUserName=' + params['ADB']['ADBUserName'] + ' ' + \
'--ADBPassword=' + params['ADB']['ADBPassword'] + ' ' + \
\
'--UEIPAddress=' + params['UE']['UEIPAddress'] + ' ' + \
'--UEUserName=' + params['UE']['UEUserName'] + ' ' + \
'--UEPassword=' + params['UE']['UEPassword'] + ' ' + \
'--UESourceCodePath=' + params['UE']['UESourceCodePath'] + ' ' + \
\
'--EPCIPAddress=' + params['EPC']['EPCIPAddress'] + ' ' + \
'--EPCUserName=' + params['EPC']['EPCUserName'] + ' ' + \
'--EPCPassword=' + params['EPC']['EPCPassword'] + ' ' + \
'--EPCSourceCodePath=' + params['EPC']['EPCSourceCodePath'] + ' ' + \
'--EPCType=' + params['EPC']['EPCType'] + ' ' + \
\
'--eNBIPAddress=' + params['RAN'][0]['eNBIPAddress'] + ' ' + \
'--eNBUserName=' + params['RAN'][0]['eNBUserName'] + ' ' + \
'--eNBPassword=' + params['RAN'][0]['eNBPassword'] + ' ' + \
'--eNBSourceCodePath=' + params['RAN'][0]['eNBSourceCodePath'] + ' ' + \
\
'--eNB1IPAddress=' + params['RAN'][1]['eNB1IPAddress'] + ' ' + \
'--eNB1UserName=' + params['RAN'][1]['eNB1UserName'] + ' ' + \
'--eNB1Password=' + params['RAN'][1]['eNB1Password'] + ' ' + \
'--eNB1SourceCodePath=' + params['RAN'][1]['eNB1SourceCodePath'] + ' '
if mode!="InitiateHtml":
line+='--XMLTestFile=' + f_xml
#if mode is InitiateHTML we have a special processing to mention all xml files from the list
#loop starting at 1 to avoid the xml file mentioned with InitiateHtml in yaml file (file is none)
else:
for i in range (1, len(params['steps'])):
step=params['steps'][i].split(',')
f_xml=step[1]
line+='--XMLTestFile=' + f_xml+' '
line+='\n'
print(line)
f.write(line)
subprocess.call(['chmod','777',f_sh])
if __name__ == "__main__":
main()
ranRepository : https://gitlab.eurecom.fr/oai/openairinterface5g.git
ranBranch : BRANCH_NAME
ranCommitID : COMMIT_ID
ranAllowMerge : 'true'
ranTargetBranch : develop
steps:
- InitiateHtml,none
- TesteNB,xml_files/fr1_multi_node_build.xml
- TesteNB,xml_files/fr1_epc_start.xml
- TesteNB,xml_files/fr1_ran_ue_proc.xml #ue toggle, nodes initialize, ue toggle, ping, nodes terminate
- TesteNB,xml_files/fr1_epc_closure.xml
ADB: #on Caracal
ADBIPAddress : 192.168.18.196
ADBUserName : oaici
ADBPassword : KkexF6CErOi1fNuebCPsuIVK
RAN:
- eNBIPAddress : 192.168.18.199 #eNB on Minimassive
eNBUserName : oaicicd
eNBPassword : HzB*nkryaITdVd08TKlT#2Z5a!7M#~qn
eNBSourceCodePath : /tmp/CI-FR1-eNB
- eNB1IPAddress : 192.168.18.198 #gNB on Mozart
eNB1UserName : oaicicd
eNB1Password : 7zkDOFgh@w3HvRBMPTMh@BAx
eNB1SourceCodePath : /tmp/CI-FR1-gNB
EPC: #on Nikaia
EPCIPAddress : 192.168.18.99
EPCUserName : nikaia
EPCPassword : linux
EPCSourceCodePath : /tmp/CI-FR1-EPC
EPCType : ltebox
UE:
UEIPAddress : none
UEUserName : none
UEPassword : none
UESourceCodePath : none
This diff is collapsed.
......@@ -32,9 +32,16 @@
000001
050000
050001
050002
050002
000001
060000
060001
000001
010002
000001
070001
070000
010002
010003
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
......@@ -89,16 +96,42 @@
<class>Ping</class>
<desc>Ping: 20pings in 20sec</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>50</ping_packetloss_threshold>
<ping_packetloss_threshold>90</ping_packetloss_threshold>
</testCase>
<testCase id="050001">
<class>Ping</class>
<desc>Ping: 5pings in 1sec</desc>
<ping_args>-c 5 -i 0.2</ping_args>
<ping_packetloss_threshold>50</ping_packetloss_threshold>
<ping_packetloss_threshold>90</ping_packetloss_threshold>
</testCase>
<testCase id="050002">
<class>Ping</class>
<desc>Ping: 100pings in 20sec</desc>
<ping_args>-c 100 -i 0.2</ping_args>
<ping_packetloss_threshold>90</ping_packetloss_threshold>
</testCase>
<testCase id="060000">
<class>Iperf</class>
<desc>iperf (DL/10Kbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 10K -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>90</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="060001">
<class>Iperf</class>
<desc>iperf (UL/10Kbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 10K -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>90</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="070000">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
......
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