testsuite/: Added cleanup file to initialize registry before running checks.

Original commit message from CVS:
* testsuite/Makefile.am:
* testsuite/runtests.py:
* testsuite/cleanup.py:
Added cleanup file to initialize registry before running checks.
Added G_DEBUG=gc-friendly to valgrinding
Only test test_*.py files
This commit is contained in:
Edward Hervey 2006-06-12 16:51:36 +00:00
parent 744d54fc59
commit 8c3aae3818
4 changed files with 19 additions and 3 deletions

View file

@ -1,3 +1,12 @@
2006-06-12 Edward Hervey <edward@fluendo.com>
* testsuite/Makefile.am:
* testsuite/runtests.py:
* testsuite/cleanup.py:
Added cleanup file to initialize registry before running checks.
Added G_DEBUG=gc-friendly to valgrinding
Only test test_*.py files
2006-06-11 Edward Hervey <edward@fluendo.com>
* .cvsignore:

View file

@ -33,17 +33,20 @@ tests = \
test_xml.py
check-local: testhelper.la
@PYTHONPATH=$(top_builddir):$(top_builddir)/gst/.libs:`pwd`:$(top_srcdir):$(PYTHONPATH) $(PYTHON) $(srcdir)/cleanup.py
@PYTHONPATH=$(top_builddir):$(top_builddir)/gst/.libs:`pwd`:$(top_srcdir):$(PYTHONPATH) $(PYTHON) $(srcdir)/runtests.py
@rm -fr *.pyc
check-verbose: testhelper.la
@VERBOSE=yes PYTHONPATH=$(top_builddir):$(top_builddir)/gst/.libs:`pwd`:$(top_srcdir):$(PYTHONPATH) $(PYTHON) $(srcdir)/cleanup.py
@VERBOSE=yes PYTHONPATH=$(top_builddir):$(top_builddir)/gst/.libs:`pwd`:$(top_srcdir):$(PYTHONPATH) $(PYTHON) $(srcdir)/runtests.py
@rm -fr *.pyc
EXTRA_DIST = $(tests) common.py runtests.py test-object.h python.supp gstpython.supp
EXTRA_DIST = $(tests) common.py cleanup.py runtests.py test-object.h python.supp gstpython.supp
if HAVE_VALGRIND
check-valgrind:
$(PYTHON) cleanup.py
make valgrind
else
check-valgrind:
@ -65,7 +68,7 @@ TESTS_ENVIRONMENT = PYTHONPATH=$(top_srcdir)/:$(PYTHONPATH)
# valgrind any given test_x.py by running make test_x.py.valgrind
%.valgrind: %
$(TESTS_ENVIRONMENT) \
G_SLICE=always-malloc \
G_DEBUG=gc-friendly G_SLICE=always-malloc \
$(VALGRIND_PATH) -q \
--suppressions=$(GSTSUPP) \
--suppressions=$(PYTHONSUPP) \

4
testsuite/cleanup.py Normal file
View file

@ -0,0 +1,4 @@
import pygst
pygst.require('0.10')
import gst

View file

@ -31,7 +31,7 @@ SKIP_FILES = ['common', 'runtests']
def gettestnames(which):
if not which:
dir = os.path.split(os.path.abspath(__file__))[0]
which = [os.path.basename(p) for p in glob.glob('%s/*.py' % dir)]
which = [os.path.basename(p) for p in glob.glob('%s/test_*.py' % dir)]
names = map(lambda x: x[:-3], which)
for f in SKIP_FILES: