diff --git a/ChangeLog b/ChangeLog index 4442a8d759..8c58c608e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-06-12 Edward Hervey + + * 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 * .cvsignore: diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index 31e7b51de9..b0833c5355 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -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) \ diff --git a/testsuite/cleanup.py b/testsuite/cleanup.py new file mode 100644 index 0000000000..6673d56701 --- /dev/null +++ b/testsuite/cleanup.py @@ -0,0 +1,4 @@ +import pygst +pygst.require('0.10') +import gst + diff --git a/testsuite/runtests.py b/testsuite/runtests.py index 5d2c39388b..f3e9b1f266 100644 --- a/testsuite/runtests.py +++ b/testsuite/runtests.py @@ -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: