mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
CI: Extend Custom_Script to accept arguments
This commit is contained in:
committed by
Robert Schmidt
parent
1dca20ba85
commit
0d2212ca38
@@ -233,10 +233,10 @@ def Custom_Command(HTML, node, command):
|
||||
HTML.CreateHtmlTestRowQueue(command, status, message)
|
||||
return status == 'OK' or status == 'Warning'
|
||||
|
||||
def Custom_Script(HTML, node, script):
|
||||
def Custom_Script(HTML, node, script, args):
|
||||
logging.info(f"Executing custom script on {node}")
|
||||
with cls_cmd.getConnection(node) as c:
|
||||
ret = c.exec_script(script, 90)
|
||||
ret = c.exec_script(script, 90, args)
|
||||
logging.debug(f"Custom_Script: {script} on node: {node} - return code {ret.returncode}, output:\n{ret.stdout}")
|
||||
status = 'OK'
|
||||
message = [ret.stdout]
|
||||
|
||||
@@ -328,9 +328,10 @@ def ExecuteActionWithParam(action, ctx):
|
||||
elif action == 'Custom_Script':
|
||||
node = test.findtext('node')
|
||||
script = test.findtext('script')
|
||||
args = test.findtext('args')
|
||||
# Allow referencing repository workspace path in XML via %%workspace%%
|
||||
script = script.replace("%%workspace%%", CONTAINERS.eNBSourceCodePath)
|
||||
success = cls_oaicitest.Custom_Script(HTML, node, script)
|
||||
success = cls_oaicitest.Custom_Script(HTML, node, script, args)
|
||||
|
||||
elif action == 'Pull_Cluster_Image':
|
||||
tag_prefix = test.findtext('tag_prefix') or ""
|
||||
|
||||
Reference in New Issue
Block a user