mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
validate:tools: Enhance the way we detect if ges-launch can be used
We make sure it has been compiled against gst-validate
This commit is contained in:
parent
c7aa259c78
commit
bd3aaded49
2 changed files with 15 additions and 5 deletions
|
@ -19,6 +19,7 @@
|
|||
|
||||
import os
|
||||
import urlparse
|
||||
import subprocess
|
||||
from urllib import unquote
|
||||
from gi.repository import GES, Gst, GLib
|
||||
from baseclasses import GstValidateTest, TestsManager
|
||||
|
@ -166,10 +167,16 @@ class GESTestsManager(TestsManager):
|
|||
|
||||
|
||||
def init(self):
|
||||
if which(DEFAULT_GES_LAUNCH):
|
||||
return True
|
||||
|
||||
return False
|
||||
try:
|
||||
if "--set-scenario=" in subprocess.check_output([DEFAULT_GES_LAUNCH, "--help"]):
|
||||
return True
|
||||
else:
|
||||
self.warning("Can not use ges-launch, it seems not to be compiled against"
|
||||
" gst-validate")
|
||||
except subprocess.CalledProcessError as e:
|
||||
self.warning("Can not use ges-launch: %s" % e)
|
||||
except OSError as e:
|
||||
self.warning("Can not use ges-launch: %s" % e)
|
||||
|
||||
def add_options(self, group):
|
||||
group.add_option("-P", "--projects-paths", dest="projects_paths",
|
||||
|
|
|
@ -222,13 +222,16 @@ class GstValidateTest(Test):
|
|||
))
|
||||
|
||||
|
||||
class TestsManager(object):
|
||||
class TestsManager(Loggable):
|
||||
|
||||
""" A class responsible for managing tests. """
|
||||
|
||||
name = ""
|
||||
|
||||
def __init__(self):
|
||||
|
||||
Loggable.__init__(self)
|
||||
|
||||
self.tests = []
|
||||
self.options = None
|
||||
self.args = None
|
||||
|
|
Loading…
Reference in a new issue