Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
65dabc41
Commit
65dabc41
authored
Jun 25, 2019
by
Guillaume Pasero
Browse files
CI: add traces
parent
6d87b300
Pipeline
#1945
passed with stages
in 48 minutes and 19 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
CI/cdash_handler.py
View file @
65dabc41
...
...
@@ -31,7 +31,7 @@ import time
import
xml.etree.ElementTree
as
ET
trace
=
Fals
e
trace
=
Tru
e
"""
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment