diff --git a/validate/tools/launcher/apps/ges-launch.py b/validate/tools/launcher/apps/ges-launch.py index 984fc7b2fa..4b11e02b0c 100644 --- a/validate/tools/launcher/apps/ges-launch.py +++ b/validate/tools/launcher/apps/ges-launch.py @@ -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", diff --git a/validate/tools/launcher/baseclasses.py b/validate/tools/launcher/baseclasses.py index 9a3b3d5fa3..4aa8db4590 100644 --- a/validate/tools/launcher/baseclasses.py +++ b/validate/tools/launcher/baseclasses.py @@ -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