CI: Harmonize LDPC CUDA and T2 test/analysis in physim

- Introduce "Run_Physim" function for running ldpctest (with CUDA) and
nr_dlsim/nr_ulsim (with T2) in RAN-gNB-N300-Timing-Phytest-LDPC test
pipeline.
- Create "cls_analysis.py" and introduce "analyze_physim" for
log analysis of physim tests.
- Define patterns to be searched in the physim logs.
- Extract and print information about total gNB RX/TX PHY processing time
from nr_ulsim/nr_dlsim logs.
- Remove "cls_physim.py" as it is not used anymore, cleanup "main.py".
This commit is contained in:
Jaroslava Fiedlerova
2024-11-12 12:02:03 +01:00
parent d0f9d4c028
commit 14a41df0ec
9 changed files with 254 additions and 282 deletions
+6 -18
View File
@@ -39,7 +39,6 @@ import constants as CONST
import cls_oaicitest #main class for OAI CI test framework
import cls_physim #class PhySim for physical simulators build and test
import cls_containerize #class Containerize for all container-based operations on RAN/UE objects
import cls_static_code_analysis #class for static code analysis
import cls_physim1 #class PhySim for physical simulators deploy and run
@@ -87,7 +86,6 @@ def CheckClassValidity(xml_class_list,action,id):
resp=True
return resp
#assigning parameters to object instance attributes (even if the attributes do not exist !!)
def AssignParams(params_dict):
@@ -95,9 +93,6 @@ def AssignParams(params_dict):
setattr(CiTestObj, key, value)
setattr(RAN, key, value)
setattr(HTML, key, value)
setattr(ldpc, key, value)
def ExecuteActionWithParam(action):
global SSH
@@ -108,7 +103,6 @@ def ExecuteActionWithParam(action):
global SCA
global PHYSIM
global CLUSTER
global ldpc
if action == 'Build_eNB' or action == 'Build_Image' or action == 'Build_Proxy' or action == "Build_Cluster_Image" or action == "Build_Run_Tests":
RAN.Build_eNB_args=test.findtext('Build_eNB_args')
CONTAINERS.imageKind=test.findtext('kind')
@@ -365,14 +359,11 @@ def ExecuteActionWithParam(action):
elif action == 'Create_Workspace':
success = CONTAINERS.Create_Workspace(HTML)
elif action == 'Run_CUDATest' or action == 'Run_T2Test':
ldpc.runargs = test.findtext('physim_run_args')
ldpc.runsim = test.findtext('physim_run')
ldpc.timethrs = test.findtext('physim_time_threshold')
if action == 'Run_CUDATest':
success = ldpc.Run_CUDATest(HTML,CONST,id)
elif action == 'Run_T2Test':
success = ldpc.Run_T2Test(HTML,CONST,id)
elif action == 'Run_Physim':
physim_options = test.findtext('physim_run_args')
physim_test = test.findtext('physim_test')
physim_threshold = test.findtext('physim_time_threshold') or 'inf'
success = cls_native.Native.Run_Physim(HTML, RAN.eNBIPAddress, RAN.eNBSourceCodePath, physim_options, physim_test, physim_threshold)
elif action == 'LicenceAndFormattingCheck':
success = SCA.LicenceAndFormattingCheck(HTML)
@@ -479,15 +470,12 @@ SCA = cls_static_code_analysis.StaticCodeAnalysis()
PHYSIM = cls_physim1.PhySim()
CLUSTER = cls_cluster.Cluster()
ldpc=cls_physim.PhySim() #create an instance for LDPC test using GPU or CPU build
#-----------------------------------------------------------
# Parsing Command Line Arguments
#-----------------------------------------------------------
import args_parse
py_param_file_present, py_params, mode = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER)
py_param_file_present, py_params, mode = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER)