mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +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 os
|
||||||
import urlparse
|
import urlparse
|
||||||
|
import subprocess
|
||||||
from urllib import unquote
|
from urllib import unquote
|
||||||
from gi.repository import GES, Gst, GLib
|
from gi.repository import GES, Gst, GLib
|
||||||
from baseclasses import GstValidateTest, TestsManager
|
from baseclasses import GstValidateTest, TestsManager
|
||||||
|
@ -166,10 +167,16 @@ class GESTestsManager(TestsManager):
|
||||||
|
|
||||||
|
|
||||||
def init(self):
|
def init(self):
|
||||||
if which(DEFAULT_GES_LAUNCH):
|
try:
|
||||||
return True
|
if "--set-scenario=" in subprocess.check_output([DEFAULT_GES_LAUNCH, "--help"]):
|
||||||
|
return True
|
||||||
return False
|
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):
|
def add_options(self, group):
|
||||||
group.add_option("-P", "--projects-paths", dest="projects_paths",
|
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. """
|
""" A class responsible for managing tests. """
|
||||||
|
|
||||||
name = ""
|
name = ""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
||||||
|
Loggable.__init__(self)
|
||||||
|
|
||||||
self.tests = []
|
self.tests = []
|
||||||
self.options = None
|
self.options = None
|
||||||
self.args = None
|
self.args = None
|
||||||
|
|
Loading…
Reference in a new issue