Use archiveArtifact() for cls_native.run_physim()
This commit is contained in:
@@ -65,15 +65,14 @@ class Native():
|
|||||||
HTML.CreateHtmlTestRow(options, 'KO', CONST.ALL_PROCESSES_OK)
|
HTML.CreateHtmlTestRow(options, 'KO', CONST.ALL_PROCESSES_OK)
|
||||||
return success
|
return success
|
||||||
|
|
||||||
def Run_Physim(HTML, host, directory, options, physim_test, threshold):
|
def Run_Physim(ctx, HTML, host, directory, options, physim_test, threshold):
|
||||||
logging.debug(f'Runnin {physim_test} on server: {host}')
|
logging.debug(f'Runnin {physim_test} on server: {host}')
|
||||||
workSpacePath = f'{directory}/cmake_targets'
|
workSpacePath = f'{directory}/cmake_targets'
|
||||||
os.system(f'mkdir -p ./{LOG_PATH_PHYSIM}')
|
runLogFile=f'{workSpacePath}/physim.log'
|
||||||
runLogFile=f'physim_{HTML.testCase_id}.log'
|
|
||||||
with cls_cmd.getConnection(host) as cmd:
|
with cls_cmd.getConnection(host) as cmd:
|
||||||
cmd.run(f'sudo LD_LIBRARY_PATH=.:{DPDK_PATH}/lib64/ {workSpacePath}/ran_build/build/{physim_test} {options} >> {workSpacePath}/{runLogFile}')
|
cmd.run(f'sudo LD_LIBRARY_PATH=.:{DPDK_PATH}/lib64/ {workSpacePath}/ran_build/build/{physim_test} {options} >> {runLogFile}')
|
||||||
cmd.copyin(src=f'{workSpacePath}/{runLogFile}', tgt=f'{LOG_PATH_PHYSIM}/{runLogFile}')
|
physim_file = archiveArtifact(cmd, ctx, runLogFile)
|
||||||
success, msg = cls_analysis.Analysis.analyze_physim(f'{LOG_PATH_PHYSIM}/{runLogFile}', physim_test, options, threshold)
|
success, msg = cls_analysis.Analysis.analyze_physim(physim_file, physim_test, options, threshold)
|
||||||
if success:
|
if success:
|
||||||
HTML.CreateHtmlTestRowQueue(options, 'OK', [msg])
|
HTML.CreateHtmlTestRowQueue(options, 'OK', [msg])
|
||||||
else:
|
else:
|
||||||
|
|||||||
+1
-1
@@ -343,7 +343,7 @@ def ExecuteActionWithParam(action, ctx):
|
|||||||
physim_options = test.findtext('physim_run_args')
|
physim_options = test.findtext('physim_run_args')
|
||||||
physim_test = test.findtext('physim_test')
|
physim_test = test.findtext('physim_test')
|
||||||
physim_threshold = test.findtext('physim_time_threshold') or 'inf'
|
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)
|
success = cls_native.Native.Run_Physim(ctx, HTML, RAN.eNBIPAddress, RAN.eNBSourceCodePath, physim_options, physim_test, physim_threshold)
|
||||||
|
|
||||||
elif action == 'LicenceAndFormattingCheck':
|
elif action == 'LicenceAndFormattingCheck':
|
||||||
success = SCA.LicenceAndFormattingCheck(HTML)
|
success = SCA.LicenceAndFormattingCheck(HTML)
|
||||||
|
|||||||
Reference in New Issue
Block a user