Commit fba1f21b authored by Johan Dahlin's avatar Johan Dahlin

testsuite/Makefile.am (check-local): distcheck fixes

Original commit message from CVS:
* testsuite/Makefile.am (check-local): distcheck fixes

* testsuite/common.py: Put in a couple of hacks to make distcheck
pass make check

* testsuite/interface.py: New test
parent 339261e4
2004-03-17 Johan Dahlin <johan@gnome.org>
* testsuite/Makefile.am (check-local): distcheck fixes
* testsuite/common.py: Put in a couple of hacks to make distcheck
pass make check
* testsuite/interface.py: New test
* gst/gst.defs: Remove unused functions.
* gst/gst.override: Ditto
......
......@@ -45,6 +45,7 @@ initinterfaces (void)
pyinterfaces_add_constants (m, "GST_");
if (PyErr_Occurred ()) {
Py_FatalError ("can't initialize module gst.interfaces");
PyErr_Print ();
Py_FatalError ("can't initialize module gst.interfaces");
}
}
tests = \
common.py \
element.py \
interface.py \
pipeline.py
check-local:
@$(PYTHON) runtests.py
@PYTHONPATH=$(top_builddir) $(PYTHON) $(srcdir)/runtests.py
@rm -fr *.pyc
EXTRA_DIST = $(tests) runtests.py
#
import dl
import os
import sys
import unittest
sys.path.insert(0, '..')
devloc = os.path.join('..', 'gst', '.libs')
if os.path.exists(devloc):
sys.path.insert(0, devloc)
# Load GST and make sure we load it from the current build
import gst
sys.setdlopenflags(dl.RTLD_LAZY | dl.RTLD_GLOBAL)
# We're importing _gst, since we don't have access to __init__.py
# during distcheck where builddir != srcdir
import _gst as gst
# Put the fake module in sys.modules, otherwise the C modules
# Can't find the classes accordingly
sys.modules['gst'] = gst
try:
import interfaces
gst.interfaces = interfaces
sys.modules['gst.interfaces'] = interfaces
except ImportError:
pass
try:
import play
gst.play = play
sys.modules['gst.play'] = play
except ImportError:
pass
assert sys.modules.has_key('_gst')
assert os.path.basename(sys.modules['_gst'].__file__), \
os.path.join('..', 'gst', 'libs')
del devloc, sys, os, dl
from common import gst, unittest
try:
from gst import interfaces
except:
raise SystemExit
import gobject
class Availability(unittest.TestCase):
def testXOverlay(self):
assert hasattr(interfaces, 'XOverlay')
assert issubclass(interfaces.XOverlay, gobject.GInterface)
def testMixer(self):
assert hasattr(interfaces, 'Mixer')
assert issubclass(interfaces.Mixer, gobject.GInterface)
if __name__ == "__main__":
unittest.main()
......@@ -6,7 +6,7 @@ from types import ClassType
loader = TestLoader()
testRunner = TextTestRunner()
for name in ('element', 'pipeline'):
for name in ('element', 'interface', 'pipeline'):
print 'Testing', name
tests = loader.loadTestsFromName(name)
testRunner.run(tests)
from common import gst, unittest
try:
from gst import interfaces
except:
raise SystemExit
import gobject
class Availability(unittest.TestCase):
def testXOverlay(self):
assert hasattr(interfaces, 'XOverlay')
assert issubclass(interfaces.XOverlay, gobject.GInterface)
def testMixer(self):
assert hasattr(interfaces, 'Mixer')
assert issubclass(interfaces.Mixer, gobject.GInterface)
if __name__ == "__main__":
unittest.main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment