mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +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) {
|
||||
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;
|
||||
for (iter = criticals; iter; iter = iter->next) {
|
||||
g_printerr (" Critical error %s\n",
|
||||
g_printerr (" * critical error %s\n",
|
||||
((GstValidateReport *) (iter->data))->message);
|
||||
}
|
||||
g_printerr ("\n");
|
||||
|
|
|
@ -3925,9 +3925,7 @@ gst_validate_scenario_factory_create (GstValidateRunner *
|
|||
}
|
||||
|
||||
gst_validate_printf (NULL,
|
||||
"\n=========================================\n"
|
||||
"Running scenario %s on pipeline %s"
|
||||
"\n=========================================\n", scenario_name,
|
||||
"\n**-> Running scenario %s on pipeline %s**\n\n", scenario_name,
|
||||
GST_OBJECT_NAME (pipeline));
|
||||
|
||||
scenario->priv->overrides =
|
||||
|
|
|
@ -247,7 +247,7 @@ class Test(Loggable):
|
|||
if not stack_trace:
|
||||
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:
|
||||
print(info)
|
||||
return
|
||||
|
@ -259,6 +259,11 @@ class Test(Loggable):
|
|||
f.write(info)
|
||||
|
||||
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,
|
||||
message, error))
|
||||
|
||||
|
@ -526,10 +531,10 @@ class Test(Loggable):
|
|||
self.command = self.use_valgrind(self.command, self.proc_env)
|
||||
|
||||
if not self.options.redirect_logs:
|
||||
self.out.write("Test name: %s\n"
|
||||
"Command: '%s'\n"
|
||||
"%s\n"
|
||||
% (self.classname, self.get_command_repr(), '-' * 80))
|
||||
self.out.write("**Test name**: `%s`\n\n"
|
||||
"**Command**:\n\n``` bash\n%s\n```\n\n" % (
|
||||
self.classname, self.get_command_repr()))
|
||||
self.out.write("**%s logs**:\n\n``` log\n\n" % self.command[0])
|
||||
self.out.flush()
|
||||
else:
|
||||
message = "Launching: %s%s\n" \
|
||||
|
@ -1115,19 +1120,14 @@ class GstValidateEncodingTestInterface(object):
|
|||
|
||||
command = [GstValidateBaseTestManager.COMMAND] + \
|
||||
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:
|
||||
self.out.write(
|
||||
"=================\n"
|
||||
"Running IQA tests on results of: %s\n"
|
||||
"Command: '%s'\n"
|
||||
"=================\n\n" % (
|
||||
self.classname, ' '.join(command)))
|
||||
self.out.write(msg)
|
||||
self.out.flush()
|
||||
else:
|
||||
message = "Running IQA tests on results of:%s %s\n" \
|
||||
" Command: %s\n" % (
|
||||
Colors.ENDC, self.classname, ' '.join(command))
|
||||
printc(message, Colors.OKBLUE)
|
||||
printc(msg, Colors.OKBLUE)
|
||||
|
||||
self.process = subprocess.Popen(command,
|
||||
stderr=self.out,
|
||||
|
|
Loading…
Reference in a new issue