[Bug 742973] validate: launcher: Fix log file creation when redirecting to stdout

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Jan 15 08:08:36 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=742973
  GStreamer | gst-devtools | git

--- Comment #5 from Ramiro Polla <ramiro.polla at collabora.co.uk> 2015-01-15 16:08:30 UTC ---
Review of attachment 294599:
 --> (https://bugzilla.gnome.org/review?bug=742973&attachment=294599)

::: validate/launcher/baseclasses.py
@@ +349,3 @@
     def clean(self, full=True):
         Test.clean(self, full=full)
+        if hasattr(self, 'validatelogs') and not self.options.redirect_logs:

The previous check worked by chance, because at the first time this function is
called, the log file hadn't been opened in the reporter, so the check for
uses_standard_output() would return false. validatelogs is set in an unrelated
part of the code.

The check with hasattr() is not elegant, but it is removed by the next patch,
which no longer creates temporary directories (and therefore no longer needs to
remove temporary files). I don't think it's worth fixing the other issue just
to have it removed by the next patch.

::: validate/launcher/main.py
@@ +251,3 @@
         if not os.path.exists(self.dest):
             os.makedirs(self.dest)
+        if not os.path.exists(self.logsdir):

In _TestsLauncher:set_settings(). The check there can be removed, thanks for
spotting.

When using -l stdout, a directory named stdout would be created to output some
log files.

@@ +408,3 @@
                            help="Directory where to store logs and rendered
files. Default is MAIN_DIR")
     dir_group.add_argument("-l", "--logs-dir", dest="logsdir",
+                           help="Directory where to store logs, default is
OUTPUT_DIR/logs.")

Ok, so what about keeping -l stdout/stderr, but just using that information to
set redirect_logs internally, and using the default logsdir again?

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list