From 6bd9177205ffaea62d354dc7406ef7d0fd9eb538 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 10 Jan 2014 15:30:38 +0100 Subject: [PATCH] validate:tools: Properly inform the user about the log location when test fails --- validate/tools/launcher/baseclasses.py | 6 ++++-- validate/tools/launcher/reporters.py | 1 + validate/tools/launcher/utils.py | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/validate/tools/launcher/baseclasses.py b/validate/tools/launcher/baseclasses.py index e72562e464..d7f13e88cb 100644 --- a/validate/tools/launcher/baseclasses.py +++ b/validate/tools/launcher/baseclasses.py @@ -50,14 +50,16 @@ class Test(Loggable): self.time_taken = 0.0 self._starting_time = None self.result = Result.NOT_RUN + self.logfile = None def __str__(self): string = self.classname if self.result != Result.NOT_RUN: string += ": " + self.result if self.result in [Result.FAILED, Result.TIMEOUT]: - string += " '%s'\n You can reproduce with: %s" \ - % (self.message, self.command) + string += " '%s'\n You can reproduce with: %s\n " \ + "You can find logs in: %s" % (self.message, self.command, + self.logfile) return string diff --git a/validate/tools/launcher/reporters.py b/validate/tools/launcher/reporters.py index 2aa6ebf77c..d7b231a0a6 100644 --- a/validate/tools/launcher/reporters.py +++ b/validate/tools/launcher/reporters.py @@ -69,6 +69,7 @@ class Reporter(Loggable): mkdir(os.path.dirname(path)) self.out = open(path, 'w+') self._current_test = test + test.logfile = path def set_failed(self, test): self.stats["failure"] += 1 diff --git a/validate/tools/launcher/utils.py b/validate/tools/launcher/utils.py index 43bba25ea6..8ae35bac08 100644 --- a/validate/tools/launcher/utils.py +++ b/validate/tools/launcher/utils.py @@ -151,6 +151,7 @@ FORMATS = {"aac": "audio/mpeg,mpegversion=4", "mp4": "video/quicktime,variant=iso;", "webm": "video/webm"} + def get_profile_full(muxer, venc, aenc, video_restriction=None, audio_restriction=None, audio_presence=0, video_presence=0): @@ -176,7 +177,6 @@ def get_profile_full(muxer, venc, aenc, video_restriction=None, return ret.replace("::", ":") - def get_profile(combination): return get_profile_full(FORMATS[combination.container], FORMATS[combination.vcodec],