mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 12:41:05 +00:00
validate:launcher: Always put gst-validate result as stderr in reports
This way jenkins will always keep the information in its database even if the test passes
This commit is contained in:
parent
4f920dc405
commit
925ff7542b
3 changed files with 16 additions and 9 deletions
|
@ -1504,7 +1504,8 @@ init_scenarios (void)
|
||||||
"Action to wait during 'duration' seconds", FALSE);
|
"Action to wait during 'duration' seconds", FALSE);
|
||||||
gst_validate_add_action_type ("dot-pipeline", _execute_dot_pipeline, NULL,
|
gst_validate_add_action_type ("dot-pipeline", _execute_dot_pipeline, NULL,
|
||||||
"Action to wait dot the pipeline (the 'name' property will be included in the"
|
"Action to wait dot the pipeline (the 'name' property will be included in the"
|
||||||
" dot filename. Also the GST_DEBUG_DUMP_DOT_DIR env variable needs to be set", FALSE);
|
" dot filename. Also the GST_DEBUG_DUMP_DOT_DIR env variable needs to be set",
|
||||||
|
FALSE);
|
||||||
gst_validate_add_action_type ("set-feature-rank", _set_rank, NULL,
|
gst_validate_add_action_type ("set-feature-rank", _set_rank, NULL,
|
||||||
"Allows you to change the ranking of a particular plugin feature", TRUE);
|
"Allows you to change the ranking of a particular plugin feature", TRUE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ class Test(Loggable):
|
||||||
value = f.read()
|
value = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
return value
|
return value, sys.stdout
|
||||||
|
|
||||||
|
|
||||||
def get_classname(self):
|
def get_classname(self):
|
||||||
|
@ -287,12 +287,13 @@ class GstValidateTest(Test):
|
||||||
self.add_arguments("--set-scenario", self.scenario.name)
|
self.add_arguments("--set-scenario", self.scenario.name)
|
||||||
|
|
||||||
def get_extra_log_content(self, extralog):
|
def get_extra_log_content(self, extralog):
|
||||||
value = Test.get_extra_log_content(self, extralog)
|
value, stdo = Test.get_extra_log_content(self, extralog)
|
||||||
|
|
||||||
if extralog == self.validatelogs:
|
if extralog == self.validatelogs:
|
||||||
value = re.sub("<position:.*/>\r", "", value)
|
value = re.sub("<position:.*/>\r", "", value)
|
||||||
|
stdo = sys.stderr
|
||||||
|
|
||||||
return value
|
return value, stdo
|
||||||
|
|
||||||
def get_validate_criticals_errors(self):
|
def get_validate_criticals_errors(self):
|
||||||
ret = "["
|
ret = "["
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
import codecs
|
import codecs
|
||||||
from loggable import Loggable
|
from loggable import Loggable
|
||||||
from xml.sax import saxutils
|
from xml.sax import saxutils
|
||||||
|
@ -139,13 +140,17 @@ class XunitReporter(Reporter):
|
||||||
if value:
|
if value:
|
||||||
captured += '<system-out><![CDATA[%s' % \
|
captured += '<system-out><![CDATA[%s' % \
|
||||||
escape_cdata(value)
|
escape_cdata(value)
|
||||||
|
captured += "]]></system-out>\n"
|
||||||
|
|
||||||
for extralog in self._current_test.extra_logfiles:
|
for extralog in self._current_test.extra_logfiles:
|
||||||
captured += "\n\n===== %s =====\n\n" % escape_cdata(os.path.basename(extralog))
|
value, stdo = self._current_test.get_extra_log_content(extralog)
|
||||||
value = self._current_test.get_extra_log_content(extralog)
|
if stdo == sys.stdout:
|
||||||
captured += escape_cdata(value)
|
out = 'system-out'
|
||||||
|
else:
|
||||||
captured += "]]></system-out>"
|
out = 'system-err'
|
||||||
|
captured += '<%s><![CDATA[%s%s]]></%s>\n' % (out,
|
||||||
|
"\n\n===== %s =====\n\n" % escape_cdata(os.path.basename(extralog)),
|
||||||
|
escape_cdata(value), out)
|
||||||
|
|
||||||
return captured
|
return captured
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue