From 2c52d6374cd36f61739c0fe5ba9df0b6e438ba68 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 30 Jan 2014 12:20:33 +0100 Subject: [PATCH] tools:validate: Make default blacklist handled by managers themselves --- validate/tools/launcher/apps/gst-validate.py | 11 +++++++++++ validate/tools/launcher/baseclasses.py | 13 +++++++++++++ validate/tools/launcher/main.py | 20 ++++++++++---------- 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/validate/tools/launcher/apps/gst-validate.py b/validate/tools/launcher/apps/gst-validate.py index 3adda8260d..78989b3cfc 100644 --- a/validate/tools/launcher/apps/gst-validate.py +++ b/validate/tools/launcher/apps/gst-validate.py @@ -48,6 +48,14 @@ COMBINATIONS = [ PROTOCOL_TIMEOUTS = {"http": 60, "hls": 60} +G_V_BLACKLISTED_TESTS = [("validate.hls.playback.fast_forward.*", "https://bugzilla.gnome.org/show_bug.cgi?id=698155"), + ("validate.hls.playback.seek_with_stop.*", "https://bugzilla.gnome.org/show_bug.cgi?id=723268"), + ("validate.*.simple_backward.*webm$", "https://bugzilla.gnome.org/show_bug.cgi?id=679250"), + ("validate.http.simple_backward.*", "https://bugzilla.gnome.org/show_bug.cgi?id=723270"), + ("validate.http.playback.seek_with_stop.*webm", "matroskademux.gst_matroska_demux_handle_seek_push: Seek end-time not supported in streaming mode"), + ("validate.http.playback.seek_with_stop.*mkv", "matroskademux.gst_matroska_demux_handle_seek_push: Seek end-time not supported in streaming mode") + ] + G_V_SCENARIOS = {"file": [Scenario.get_scenario("play_15s"), Scenario.get_scenario("simple_backward"), Scenario.get_scenario("fast_forward"), @@ -334,3 +342,6 @@ class GstValidateManager(TestsManager, Loggable): if urlparse.urlparse(uri).scheme == "http" and \ "127.0.0.1:%s" % (self.options.http_server_port) in uri: return True + + def get_blacklisted(self): + return G_V_BLACKLISTED_TESTS diff --git a/validate/tools/launcher/baseclasses.py b/validate/tools/launcher/baseclasses.py index 4316fe10b0..6bc218204c 100644 --- a/validate/tools/launcher/baseclasses.py +++ b/validate/tools/launcher/baseclasses.py @@ -291,6 +291,9 @@ class TestsManager(Loggable): def get_tests(self): return self.tests + def get_blacklisted(self): + return [] + def add_options(self, parser): """ Add more arguments. """ pass @@ -444,6 +447,16 @@ class _TestsLauncher(Loggable): if tester.needs_http_server(): return True + def get_blacklisted(self): + res = [] + for tester in self.testers: + for blacklisted in tester.get_blacklisted(): + if isinstance(blacklisted, str): + res.append(blacklisted, "Unknown") + else: + res.append(blacklisted) + return res + class NamedDic(object): diff --git a/validate/tools/launcher/main.py b/validate/tools/launcher/main.py index f4d1df5359..44d6cd7e72 100644 --- a/validate/tools/launcher/main.py +++ b/validate/tools/launcher/main.py @@ -25,15 +25,10 @@ from optparse import OptionParser from httpserver import HTTPServer from baseclasses import _TestsLauncher -from utils import printc, path2url, DEFAULT_GST_QA_ASSETS, launch_command +from utils import printc, path2url, DEFAULT_GST_QA_ASSETS, launch_command, Colors DEFAULT_GST_QA_ASSETS_REPO = "git://people.freedesktop.org/~tsaunier/gst-qa-assets/" -BLACKLISTED_TESTS = ["validate.hls.playback.simple_backward", # bug 698155 - "validate.hls.playback.fast_forward", # bug 698155 - "validate.*.simple_backward.*webm$", # bug 679250 - ] - def main(): parser = OptionParser() @@ -60,8 +55,7 @@ def main(): parser.add_option("-b", "--blacklisted-tests", dest="blacklisted_tests", default=[], action="append", - help="Define the tests not to execute, it can be a regex." - " Currently blacklisted tests are: %s" % BLACKLISTED_TESTS) + help="Define the tests not to execute, it can be a regex.") parser.add_option("-L", "--list-tests", dest="list_tests", action="store_true", @@ -99,8 +93,14 @@ def main(): tests_launcher = _TestsLauncher() tests_launcher.add_options(parser) - for p in BLACKLISTED_TESTS: - sys.argv.extend(["-b", p]) + blacklisted = tests_launcher.get_blacklisted() + if blacklisted: + msg = "Currently 'hardcoded' blacklisted tests:\n" + for name, bug in blacklisted: + sys.argv.extend(["-b", name]) + msg += " + %s -- bug: %s\n" % (name, bug) + + printc(msg, Colors.FAIL, True) (options, args) = parser.parse_args() if options.xunit_file is None: