2004-11-23 10:16:58 +00:00
|
|
|
INCLUDES = \
|
|
|
|
$(PYTHON_INCLUDES) \
|
|
|
|
$(PYGTK_CFLAGS) \
|
|
|
|
$(PYGST_CFLAGS) \
|
|
|
|
$(GST_CFLAGS)
|
|
|
|
|
|
|
|
noinst_LTLIBRARIES = testhelper.la
|
|
|
|
linked_LIBS = testhelper.la
|
|
|
|
|
|
|
|
testhelper_la_LDFLAGS = -module -avoid-version
|
|
|
|
testhelper_la_LIBADD = $(GLIB_LIBS)
|
|
|
|
testhelper_la_SOURCES = \
|
|
|
|
testhelpermodule.c \
|
|
|
|
test-object.c
|
|
|
|
|
|
|
|
# This is a hack to make sure a shared library is built
|
|
|
|
testhelper.la: $(testhelper_la_OBJECTS) $(testhelper_la_DEPENDENCIES)
|
|
|
|
$(LINK) -rpath $(pkgpyexecdir) $(testhelper_la_LDFLAGS) $(testhelper_la_OBJECTS) $(testhelper_la_LIBADD) $(LIBS)
|
|
|
|
|
2005-10-07 16:21:22 +00:00
|
|
|
tests = \
|
2005-09-01 16:16:11 +00:00
|
|
|
test_bin.py \
|
2004-11-23 16:22:08 +00:00
|
|
|
test_buffer.py \
|
|
|
|
test_caps.py \
|
|
|
|
test_element.py \
|
2004-11-23 10:16:58 +00:00
|
|
|
test_event.py \
|
2005-10-05 21:51:36 +00:00
|
|
|
test_ghostpad.py \
|
2004-11-23 16:22:08 +00:00
|
|
|
test_interface.py \
|
2005-10-07 07:48:09 +00:00
|
|
|
test_message.py \
|
2004-11-23 16:22:08 +00:00
|
|
|
test_pad.py \
|
|
|
|
test_pipeline.py \
|
|
|
|
test_registry.py \
|
|
|
|
test_struct.py \
|
2004-11-05 17:43:05 +00:00
|
|
|
test_xml.py
|
2003-10-04 13:37:45 +00:00
|
|
|
|
2004-11-23 10:16:58 +00:00
|
|
|
check-local: testhelper.la
|
2005-09-30 15:23:15 +00:00
|
|
|
@PYTHONPATH=$(top_builddir):$(top_builddir)/gst/.libs:`pwd`:$(top_srcdir):$(PYTHONPATH) $(PYTHON) $(srcdir)/runtests.py
|
2004-03-09 14:48:03 +00:00
|
|
|
@rm -fr *.pyc
|
2003-10-04 13:37:45 +00:00
|
|
|
|
2005-09-23 15:37:40 +00:00
|
|
|
check-verbose: testhelper.la
|
2005-09-30 15:23:15 +00:00
|
|
|
@VERBOSE=yes PYTHONPATH=$(top_builddir):$(top_builddir)/gst/.libs:`pwd`:$(top_srcdir):$(PYTHONPATH) $(PYTHON) $(srcdir)/runtests.py
|
2005-09-23 15:37:40 +00:00
|
|
|
@rm -fr *.pyc
|
|
|
|
|
2005-10-07 16:21:22 +00:00
|
|
|
EXTRA_DIST = $(tests) common.py runtests.py test-object.h python.supp gstpython.supp
|
2004-11-23 10:16:58 +00:00
|
|
|
|
2005-10-07 07:19:17 +00:00
|
|
|
if HAVE_VALGRIND
|
|
|
|
check-valgrind:
|
|
|
|
make valgrind
|
|
|
|
else
|
|
|
|
check-valgrind:
|
|
|
|
@true
|
|
|
|
endif
|
|
|
|
|
|
|
|
GSTSUPP = $(top_srcdir)/common/gst.supp
|
|
|
|
PYTHONSUPP = $(top_srcdir)/testsuite/python.supp
|
2005-10-07 13:48:20 +00:00
|
|
|
GSTPYTHONSUPP = $(top_srcdir)/testsuite/gstpython.supp
|
2005-10-07 07:19:17 +00:00
|
|
|
|
|
|
|
# valgrind any given test_x.py by running make test_x.valgrind
|
|
|
|
%.valgrind: %
|
|
|
|
$(TESTS_ENVIRONMENT) \
|
|
|
|
$(VALGRIND_PATH) -q \
|
|
|
|
--suppressions=$(GSTSUPP) \
|
|
|
|
--suppressions=$(PYTHONSUPP) \
|
2005-10-07 13:48:20 +00:00
|
|
|
--suppressions=$(GSTPYTHONSUPP) \
|
2005-10-07 07:19:17 +00:00
|
|
|
--tool=memcheck --leak-check=yes --trace-children=yes \
|
|
|
|
$(PYTHON) \
|
|
|
|
$* 2>&1 | tee valgrind.log
|
|
|
|
@if grep "tely lost" valgrind.log; then \
|
|
|
|
rm valgrind.log; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
@rm valgrind.log
|
|
|
|
|
|
|
|
# valgrind all tests
|
|
|
|
valgrind: $(TESTS)
|
|
|
|
@echo "Valgrinding tests ..."
|
|
|
|
@failed=0; \
|
|
|
|
for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do \
|
|
|
|
make $$t.valgrind; \
|
|
|
|
if test "$$?" -ne 0; then \
|
|
|
|
echo "Valgrind error for test $$t"; \
|
|
|
|
failed=`expr $$failed + 1`; \
|
|
|
|
whicht="$$whicht $$t"; \
|
|
|
|
fi; \
|
|
|
|
done; \
|
|
|
|
if test "$$failed" -ne 0; then \
|
|
|
|
echo "$$failed tests had leaks under valgrind:"; \
|
|
|
|
echo "$$whicht"; \
|
|
|
|
false; \
|
|
|
|
fi
|