From abaa38284720fe70ea38db35ba3e467189825e3b Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Mon, 25 Mar 2019 16:46:46 -0300 Subject: [PATCH] validate: Generate dot files and link to them on CI --- validate/gst/validate/gst-validate-report.c | 6 +++++- validate/launcher/baseclasses.py | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/validate/gst/validate/gst-validate-report.c b/validate/gst/validate/gst-validate-report.c index 522af71..2d74614 100644 --- a/validate/gst/validate/gst-validate-report.c +++ b/validate/gst/validate/gst-validate-report.c @@ -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 diff --git a/validate/launcher/baseclasses.py b/validate/launcher/baseclasses.py index 6e74142..2218f66 100644 --- a/validate/launcher/baseclasses.py +++ b/validate/launcher/baseclasses.py @@ -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): -- 2.7.4