mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
validate:launcher: Avoid depending on PyGObject
Summary: And rely on our knowledge of the configuration to figure out where the suppression file has been installed Reviewers: gdesmott Differential Revision: http://phabricator.freedesktop.org/D61
This commit is contained in:
parent
625fe7b5df
commit
ba6d209b3f
3 changed files with 29 additions and 5 deletions
|
@ -275,6 +275,8 @@ AM_PATH_PYTHON(2.7.0)
|
|||
AS_AC_EXPAND(LIBDIR, $libdir)
|
||||
AC_MSG_NOTICE(Storing library files in $LIBDIR)
|
||||
AC_CONFIG_FILES([tools/gst-validate-launcher], [chmod +x tools/gst-validate-launcher])
|
||||
AS_AC_EXPAND(DATADIR, $datadir)
|
||||
AC_CONFIG_FILES([launcher/config.py])
|
||||
|
||||
dnl this really should only contain flags, not libs - they get added before
|
||||
dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
|
||||
|
|
|
@ -25,6 +25,7 @@ import re
|
|||
import time
|
||||
import utils
|
||||
import signal
|
||||
import config
|
||||
import urlparse
|
||||
import subprocess
|
||||
import threading
|
||||
|
@ -34,7 +35,6 @@ import ConfigParser
|
|||
import loggable
|
||||
from loggable import Loggable
|
||||
import xml.etree.cElementTree as ET
|
||||
from gi.repository import GLib
|
||||
|
||||
from utils import mkdir, Result, Colors, printc, DEFAULT_TIMEOUT, GST_SECOND, \
|
||||
Protocols
|
||||
|
@ -584,10 +584,11 @@ class GstValidateTest(Test):
|
|||
return p
|
||||
|
||||
# Look in system data dirs
|
||||
for datadir in GLib.get_system_data_dirs():
|
||||
p = os.path.join(datadir, 'gstreamer-1.0', 'validate', 'gst.supp')
|
||||
if os.path.exists(p):
|
||||
return p
|
||||
p = os.path.join(config.DATADIR, 'gstreamer-1.0', 'validate', 'gst.supp')
|
||||
if os.path.exists(p):
|
||||
return p
|
||||
|
||||
self.error("Could not find any gst.sup file")
|
||||
|
||||
return None
|
||||
|
||||
|
|
21
validate/launcher/config.py.in
Normal file
21
validate/launcher/config.py.in
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env python2
|
||||
#
|
||||
# Copyright (c) 2015,Thibault Saunier <thibault.saunier@collabora.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
|
||||
LIBDIR = '@LIBDIR@'
|
||||
DATADIR = '@DATADIR@'
|
Loading…
Reference in a new issue