mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
launcher: add a way to specify an application directory.
https://bugzilla.gnome.org/show_bug.cgi?id=739091
This commit is contained in:
parent
74ed40c904
commit
4d569b51ed
1 changed files with 21 additions and 4 deletions
|
@ -775,12 +775,29 @@ class _TestsLauncher(Loggable):
|
||||||
self._list_testers()
|
self._list_testers()
|
||||||
self.wanted_tests_patterns = []
|
self.wanted_tests_patterns = []
|
||||||
|
|
||||||
|
def _list_app_dirs (self):
|
||||||
|
app_dirs = []
|
||||||
|
app_dirs.append (os.path.join(self.libsdir, "apps"))
|
||||||
|
env_dirs = os.environ.get("GST_VALIDATE_APPS_DIR")
|
||||||
|
if env_dirs is not None:
|
||||||
|
for dir_ in env_dirs.split(":"):
|
||||||
|
app_dirs.append (dir_)
|
||||||
|
|
||||||
|
return app_dirs
|
||||||
|
|
||||||
|
def _exec_app (self, app_dir, env):
|
||||||
|
for f in os.listdir(app_dir):
|
||||||
|
if f.endswith(".py"):
|
||||||
|
execfile(os.path.join(app_dir, f), env)
|
||||||
|
|
||||||
|
def _exec_apps (self, env):
|
||||||
|
app_dirs = self._list_app_dirs()
|
||||||
|
for app_dir in app_dirs:
|
||||||
|
self._exec_app(app_dir, env)
|
||||||
|
|
||||||
def _list_testers(self):
|
def _list_testers(self):
|
||||||
env = globals().copy()
|
env = globals().copy()
|
||||||
appsdir = os.path.join(self.libsdir, "apps")
|
self._exec_apps(env)
|
||||||
for f in os.listdir(appsdir):
|
|
||||||
if f.endswith(".py"):
|
|
||||||
execfile(os.path.join(appsdir, f), env)
|
|
||||||
|
|
||||||
testers = [i() for i in utils.get_subclasses(TestsManager, env)]
|
testers = [i() for i in utils.get_subclasses(TestsManager, env)]
|
||||||
for tester in testers:
|
for tester in testers:
|
||||||
|
|
Loading…
Reference in a new issue