Skip to content
Snippets Groups Projects
Commit 65dabc41 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

CI: add traces

parent 6d87b300
No related branches found
No related tags found
3 merge requests!621Release 7.0 (master),!536CI Fixes episode N,!529CI Refactor Configure.xml parsing
Pipeline #1945 passed
......@@ -31,7 +31,7 @@ import time
import xml.etree.ElementTree as ET
trace = False
trace = True
"""
Check needed environment parameters
......@@ -76,10 +76,10 @@ class Handler:
if os.path.exists( configure_xml ):
if trace:
print ( configure_xml )
configure_file = open( configure_xml, "r" )
content = configure_file.read()
configure_file.close()
print( content )
#~ configure_file = open( configure_xml, "r" )
#~ content = configure_file.read()
#~ configure_file.close()
#~ print( content )
self.configure_path = configure_xml
return self.configure_path
print("Could not find the Configure.xml produced by ctest")
......@@ -99,6 +99,8 @@ class Handler:
content = content[:(startLog+5)]+content[endLog:]
# parse XML
root = ET.fromstring(content)
if trace:
print( root.attrib )
if not 'Name' in root.keys():
print("Can't find site name in Configure.XML")
sys.exit(1)
......@@ -131,9 +133,10 @@ class Handler:
if key == "project":
project = value
if ( site == "" or stamp == "" or name == "" or project == ""):
print( "Missing argument for buildid request \
site:"+site+", stamp:"+stamp+", name:"+name+", project:"+project+".")
print( "Missing argument for buildid request site:"+site+", stamp:"+stamp+", name:"+name+", project:"+project+".")
sys.exit(1)
elif trace:
print( "Argument for buildid request site:"+site+", stamp:"+stamp+", name:"+name+", project:"+project+".")
buildid_api = "/api/v1/getbuildid.php?"
buildid_params = urllib.parse.urlencode({'project': project, 'site': site, 'stamp': stamp , 'name': name})
full_url = self.url + buildid_api + buildid_params
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment