validate: use -debug versions of bins when running from source

Summary:
Those versions are using rpath instead of libtool's wrappers and so will be
faster to start and won't confuse valgrind.

Reviewers: thiblahute

Differential Revision: http://phabricator.freedesktop.org/D116
This commit is contained in:
Guillaume Desmottes 2015-04-21 11:00:58 +02:00 committed by Thibault Saunier
parent 8c4a3de701
commit 044ab241ee
2 changed files with 34 additions and 2 deletions

View file

@ -397,6 +397,14 @@ class GstValidateTest(Test):
else:
hard_timeout = None
# If we are running from source, use the -debug version of the
# application which is using rpath instead of libtool's wrappers. It's
# slightly faster to start and will not confuse valgrind.
debug = '%s-debug' % application_name
p = self.look_for_file_in_source_dir('tools', debug)
if p:
application_name = p
super(GstValidateTest, self).__init__(application_name, classname,
options, reporter,
duration=duration,
@ -618,13 +626,18 @@ class GstValidateTest(Test):
return position
def get_valgrind_suppression_file(self, subdir, name):
# Are we running from sources?
def look_for_file_in_source_dir(self, subdir, name):
root_dir = os.path.abspath(os.path.dirname(os.path.join(os.path.dirname(os.path.abspath(__file__)))))
p = os.path.join(root_dir, subdir, name)
if os.path.exists(p):
return p
def get_valgrind_suppression_file(self, subdir, name):
# Are we running from sources?
p = self.look_for_file_in_source_dir(subdir, name)
if p:
return p
# Look in system data dirs
p = os.path.join(config.DATADIR, 'gstreamer-1.0', 'validate', name)
if os.path.exists(p):

View file

@ -3,16 +3,35 @@ bin_PROGRAMS = \
gst-validate-transcoding-@GST_API_VERSION@ \
gst-validate-media-check-@GST_API_VERSION@
noinst_PROGRAMS = \
gst-validate-@GST_API_VERSION@-debug \
gst-validate-transcoding-@GST_API_VERSION@-debug \
gst-validate-media-check-@GST_API_VERSION@-debug
bin_SCRIPTS = \
gst-validate-launcher
AM_CFLAGS = $(GST_ALL_CFLAGS) $(GST_PBUTILS_CFLAGS) $(GST_VIDEO_CFLAGS)
LDADD = $(top_builddir)/gst/validate/libgstvalidate-@GST_API_VERSION@.la $(GST_PBUTILS_LIBS) $(GST_LIBS) $(GST_VIDEO_LIBS) $(FAULTINJECTION_LIBS)
# The -debug versions are used when running from sources to not confuse
# valgrind with libtool's wrappers. Those are built with the '-no-install' and
# so use rpath instead of wrappers.
gst_validate_@GST_API_VERSION@_SOURCES = gst-validate.c
gst_validate_@GST_API_VERSION@_CFLAGS = $(GIO_CFLAGS) $(AM_CFLAGS)
gst_validate_@GST_API_VERSION@_LDADD = $(GIO_LIBS) $(LDADD)
gst_validate_@GST_API_VERSION@_debug_SOURCES = gst-validate.c
gst_validate_@GST_API_VERSION@_debug_CFLAGS = $(GIO_CFLAGS) $(AM_CFLAGS)
gst_validate_@GST_API_VERSION@_debug_LDADD = $(GIO_LIBS) $(LDADD)
gst_validate_@GST_API_VERSION@_debug_LDFLAGS = -no-install
gst_validate_transcoding_@GST_API_VERSION@_SOURCES = gst-validate-transcoding.c
gst_validate_transcoding_@GST_API_VERSION@_debug_SOURCES = gst-validate-transcoding.c
gst_validate_transcoding_@GST_API_VERSION@_debug_LDFLAGS = -no-install
gst_validate_media_check_@GST_API_VERSION@_SOURCES = gst-validate-media-check.c
gst_validate_media_check_@GST_API_VERSION@_debug_SOURCES = gst-validate-media-check.c
gst_validate_media_check_@GST_API_VERSION@_debug_LDFLAGS = -no-install
CLEANFILES = $(bin_SCRIPTS)