validate: Generate dot files and link to them on CI

This commit is contained in:
Thibault Saunier 2019-03-25 16:46:46 -03:00 committed by Thibault Saunier
parent 01aa026e5a
commit abaa382847
2 changed files with 15 additions and 1 deletions

View file

@ -1115,11 +1115,15 @@ static void
gst_validate_report_print_dotfile (GstValidateReport * report)
{
const gchar *dotdir = g_getenv ("GST_DEBUG_DUMP_DOT_DIR");
const gchar *doturl = g_getenv ("GST_VALIDATE_DEBUG_DUMP_DOT_URL");
if (!report->dotfile_name)
return;
if (dotdir)
if (doturl)
gst_validate_printf (NULL, "%*s dotfile : %s%s%s.dot\n", 12, "",
doturl, G_DIR_SEPARATOR_S, report->dotfile_name);
else if (dotdir)
gst_validate_printf (NULL, "%*s dotfile : %s%s%s.dot\n", 12, "",
dotdir, G_DIR_SEPARATOR_S, report->dotfile_name);
else

View file

@ -836,6 +836,16 @@ class GstValidateTest(Test):
except KeyError:
pass
if not subproc_env.get('GST_DEBUG_DUMP_DOT_DIR'):
dotfilesdir = os.path.join(self.options.logsdir,
self.classname.replace(".", os.sep) + '.pipelines_dot_files')
mkdir(dotfilesdir)
subproc_env['GST_DEBUG_DUMP_DOT_DIR'] = dotfilesdir
if CI_ARTIFACTS_URL:
dotfilesurl = CI_ARTIFACTS_URL + os.path.relpath(dotfilesdir,
self.options.logsdir)
subproc_env['GST_VALIDATE_DEBUG_DUMP_DOT_URL'] = dotfilesurl
return subproc_env
def clean(self):