validate:launcher: Move get_current_position from GstValidatePipelineTest to GstValid...
authorThibault Saunier <thibault.saunier@collabora.com>
Fri, 27 Feb 2015 13:16:01 +0000 (13:16 +0000)
committerThibault Saunier <tsaunier@gnome.org>
Fri, 10 Apr 2015 14:53:40 +0000 (16:53 +0200)
This is where it belongs

Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D69

validate/launcher/apps/gstvalidate.py
validate/launcher/baseclasses.py

index 751d93d..3611e02 100644 (file)
@@ -396,26 +396,6 @@ class GstValidateLaunchTest(GstValidateTest):
             self.add_arguments(
                 "--set-media-info", self.media_descriptor.get_path())
 
-    def get_current_value(self):
-        if self.scenario:
-            sent_eos = self.sent_eos_position()
-            if sent_eos is not None:
-                t = time.time()
-                if ((t - sent_eos)) > 30:
-                    if self.media_descriptor.get_protocol() == Protocols.HLS:
-                        self.set_result(Result.PASSED,
-                                        """Got no EOS 30 seconds after sending EOS,
-                                        in HLS known and tolerated issue:
-                                        https://bugzilla.gnome.org/show_bug.cgi?id=723868""")
-                        return Result.KNOWN_ERROR
-
-                    self.set_result(
-                        Result.FAILED, "Pipeline did not stop 30 Seconds after sending EOS")
-
-                    return Result.FAILED
-
-        return self.get_current_position()
-
 
 class GstValidateMediaCheckTest(GstValidateTest):
 
index bd55d84..8c17c2d 100644 (file)
@@ -407,6 +407,26 @@ class GstValidateTest(Test):
         else:
             self.scenario = scenario
 
+    def get_current_value(self):
+        if self.scenario:
+            sent_eos = self.sent_eos_position()
+            if sent_eos is not None:
+                t = time.time()
+                if ((t - sent_eos)) > 30:
+                    if self.media_descriptor.get_protocol() == Protocols.HLS:
+                        self.set_result(Result.PASSED,
+                                        """Got no EOS 30 seconds after sending EOS,
+                                        in HLS known and tolerated issue:
+                                        https://bugzilla.gnome.org/show_bug.cgi?id=723868""")
+                        return Result.KNOWN_ERROR
+
+                    self.set_result(
+                        Result.FAILED, "Pipeline did not stop 30 Seconds after sending EOS")
+
+                    return Result.FAILED
+
+        return self.get_current_position()
+
     def get_subproc_env(self):
         self.validatelogs = self.logfile + '.validate.logs'
         logfiles = self.validatelogs