mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-09-03 10:43:55 +00:00
validate:launcher: Output markdown as much as possible
This commit is contained in:
parent
3a826e1e3d
commit
7dbdb84ca8
3 changed files with 18 additions and 20 deletions
|
@ -813,10 +813,10 @@ gst_validate_runner_printf (GstValidateRunner * runner)
|
||||||
|
|
||||||
if (criticals) {
|
if (criticals) {
|
||||||
GList *iter;
|
GList *iter;
|
||||||
g_printerr ("\n\n==== Got criticals. Return value set to 18 ====\n");
|
g_printerr ("\n\n**Got criticals. Return value set to 18**:\n");
|
||||||
ret = 18;
|
ret = 18;
|
||||||
for (iter = criticals; iter; iter = iter->next) {
|
for (iter = criticals; iter; iter = iter->next) {
|
||||||
g_printerr (" Critical error %s\n",
|
g_printerr (" * critical error %s\n",
|
||||||
((GstValidateReport *) (iter->data))->message);
|
((GstValidateReport *) (iter->data))->message);
|
||||||
}
|
}
|
||||||
g_printerr ("\n");
|
g_printerr ("\n");
|
||||||
|
|
|
@ -3925,9 +3925,7 @@ gst_validate_scenario_factory_create (GstValidateRunner *
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_validate_printf (NULL,
|
gst_validate_printf (NULL,
|
||||||
"\n=========================================\n"
|
"\n**-> Running scenario %s on pipeline %s**\n\n", scenario_name,
|
||||||
"Running scenario %s on pipeline %s"
|
|
||||||
"\n=========================================\n", scenario_name,
|
|
||||||
GST_OBJECT_NAME (pipeline));
|
GST_OBJECT_NAME (pipeline));
|
||||||
|
|
||||||
scenario->priv->overrides =
|
scenario->priv->overrides =
|
||||||
|
|
|
@ -247,7 +247,7 @@ class Test(Loggable):
|
||||||
if not stack_trace:
|
if not stack_trace:
|
||||||
return
|
return
|
||||||
|
|
||||||
info = "\n\n== Stack trace: == \n%s" % stack_trace
|
info = "\n\n**Stack trace**:\n\n```\n%s\n```" % stack_trace
|
||||||
if self.options.redirect_logs:
|
if self.options.redirect_logs:
|
||||||
print(info)
|
print(info)
|
||||||
return
|
return
|
||||||
|
@ -259,6 +259,11 @@ class Test(Loggable):
|
||||||
f.write(info)
|
f.write(info)
|
||||||
|
|
||||||
def set_result(self, result, message="", error=""):
|
def set_result(self, result, message="", error=""):
|
||||||
|
|
||||||
|
if not self.options.redirect_logs:
|
||||||
|
self.out.write("\n```\n")
|
||||||
|
self.out.flush()
|
||||||
|
|
||||||
self.debug("Setting result: %s (message: %s, error: %s)" % (result,
|
self.debug("Setting result: %s (message: %s, error: %s)" % (result,
|
||||||
message, error))
|
message, error))
|
||||||
|
|
||||||
|
@ -526,10 +531,10 @@ class Test(Loggable):
|
||||||
self.command = self.use_valgrind(self.command, self.proc_env)
|
self.command = self.use_valgrind(self.command, self.proc_env)
|
||||||
|
|
||||||
if not self.options.redirect_logs:
|
if not self.options.redirect_logs:
|
||||||
self.out.write("Test name: %s\n"
|
self.out.write("**Test name**: `%s`\n\n"
|
||||||
"Command: '%s'\n"
|
"**Command**:\n\n``` bash\n%s\n```\n\n" % (
|
||||||
"%s\n"
|
self.classname, self.get_command_repr()))
|
||||||
% (self.classname, self.get_command_repr(), '-' * 80))
|
self.out.write("**%s logs**:\n\n``` log\n\n" % self.command[0])
|
||||||
self.out.flush()
|
self.out.flush()
|
||||||
else:
|
else:
|
||||||
message = "Launching: %s%s\n" \
|
message = "Launching: %s%s\n" \
|
||||||
|
@ -1115,19 +1120,14 @@ class GstValidateEncodingTestInterface(object):
|
||||||
|
|
||||||
command = [GstValidateBaseTestManager.COMMAND] + \
|
command = [GstValidateBaseTestManager.COMMAND] + \
|
||||||
shlex.split(pipeline_desc)
|
shlex.split(pipeline_desc)
|
||||||
|
msg = "**Running IQA tests on results of**: " \
|
||||||
|
+ "%s\n**Command**: \n```\n%s\n```\n" % (
|
||||||
|
self.classname, ' '.join(command))
|
||||||
if not self.options.redirect_logs:
|
if not self.options.redirect_logs:
|
||||||
self.out.write(
|
self.out.write(msg)
|
||||||
"=================\n"
|
|
||||||
"Running IQA tests on results of: %s\n"
|
|
||||||
"Command: '%s'\n"
|
|
||||||
"=================\n\n" % (
|
|
||||||
self.classname, ' '.join(command)))
|
|
||||||
self.out.flush()
|
self.out.flush()
|
||||||
else:
|
else:
|
||||||
message = "Running IQA tests on results of:%s %s\n" \
|
printc(msg, Colors.OKBLUE)
|
||||||
" Command: %s\n" % (
|
|
||||||
Colors.ENDC, self.classname, ' '.join(command))
|
|
||||||
printc(message, Colors.OKBLUE)
|
|
||||||
|
|
||||||
self.process = subprocess.Popen(command,
|
self.process = subprocess.Popen(command,
|
||||||
stderr=self.out,
|
stderr=self.out,
|
||||||
|
|
Loading…
Reference in a new issue