Mise à jour terminée. Pour connaître les apports de la version 13.8.4 par rapport à notre ancienne version vous pouvez lire les "Release Notes" suivantes :
https://about.gitlab.com/releases/2021/02/11/security-release-gitlab-13-8-4-released/
https://about.gitlab.com/releases/2021/02/05/gitlab-13-8-3-released/

Commit 5c9e9a5b authored by Laurent Belcour's avatar Laurent Belcour

Working python command

parent 24146a6f
......@@ -12,66 +12,97 @@ root = tree.getroot()
cmds = [];
def baseName():
return "./build/";
return './build/';
#end
def libName(name):
if(os.name == "posix"):
return "lib" + name + ".so";
elif(os.name == "nt"):
if(os.name == 'posix'):
return 'lib' + name + '.so';
elif(os.name == 'nt'):
return name + ".dll";
#endif
#end
## Relative directories
lib_dir = "";
dat_dir = "";
lib_dir = '';
dat_dir = '';
out_dir = '';
## Parse the configuration part of the XML file, this will set the global
## parameters such as the relative directories.
##
def parseConfiguration(xmlNode):
#end
global lib_dir, dat_dir, out_dir;
for param in xmlNode.findall('parameter'):
def parseFit(xmlNode):
if(param.attrib['name'] == 'lib-dir'):
lib_dir = param.attrib['value'];
cmd = "";
elif(param.attrib['name'] == 'dat-dir'):
dat_dir = param.attrib["value"];
# Parse the command line arguments
for child in xmlNode:
if(child.tag == "function"):
cmd += " --func " + baseName() + libName(child.attrib["plugin"]);
cmd += " --output " + child.attrib["file"];
elif(param.attrib['name'] == 'out-dir'):
dat_dir = param.attrib["value"];
elif(child.tag == "data"):
cmd += " --input " + child.attrib["file"];
#cmd += " --data " + baseName() + libName(child.attrib["plugin"]);
#end
#end
#end
elif(child.tag == "fitter"):
cmd += " --fitter " + baseName() + libName(child.attrib["plugin"]);
#endif
def parseAction(xmlNode):
global lib_dir, dat_dir, out_dir;
cmd = '';
inputNode = xmlNode.find('input');
if not (inputNode is None):
cmd += ' --input ' + inputNode.attrib['name'];
#end
outputNode = xmlNode.find('output');
if not(outputNode is None):
cmd += ' --output ' + inputNode.attrib['name'];
#end
for plugin in xmlNode.findall('plugin'):
cmd += ' --' + plugin.attrib['type'];
cmd += ' ' + lib_dir + '/' + libName(plugin.attrib['name']);
#end
for param in xmlNode.findall('parameter'):
cmd += ' --' + param.attrib['name'];
cmd += ' ' + param.attrib['value'];
#end
return cmd;
#end
# Command lines creation
for child in root:
cmd = "";
## Parse the configuration part of the file
##
conf = root.find("configuration");
if conf is None:
print '<<PYTHON>> no configuration specified in the XML file';
else:
parseConfiguration(conf);
#end
if(child.tag == "cofiguration"):
parseConfiguration(child);
#end
if(child.tag == "fit"):
cmd += "./build/data2brdf";
cmd += parseFit(child);
#end
## Command lines creation
##
for child in root.findall('action'):
# Create the cmd string with the command name
cmd = lib_dir + '/' + child.attrib['name'];
os.system(cmd);
# Parse the action
cmd += parseAction(child);
ret = os.system(cmd);
if(ret != 0):
print '<<PYTHON>> the action was not performed';
#end
#end
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