tools:validate: Make default blacklist handled by managers themselves
authorThibault Saunier <thibault.saunier@collabora.com>
Thu, 30 Jan 2014 11:20:33 +0000 (12:20 +0100)
committerThibault Saunier <thibault.saunier@collabora.com>
Tue, 18 Feb 2014 20:07:30 +0000 (21:07 +0100)
validate/tools/launcher/apps/gst-validate.py
validate/tools/launcher/baseclasses.py
validate/tools/launcher/main.py

index 3adda8260d0e13d75b26cc68de8af9090b8eda6d..78989b3cfc66a0e43949606a6db337159dbdd3c2 100644 (file)
@@ -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
index 4316fe10b018d7bcdb2a48087b88382ef5fb4dfe..6bc218204cdb70aee541218326cef199c7168037 100644 (file)
@@ -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):
 
index f4d1df53595777b1afd137a5f34d74c73e2f096b..44d6cd7e72d7c17320824851ab17bd478897d0a0 100644 (file)
@@ -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: