diff options
author | Mark Doffman <mdoff@silver-wind.(none)> | 2008-09-30 02:32:23 +0100 |
---|---|---|
committer | Mark Doffman <mdoff@silver-wind.(none)> | 2008-09-30 02:32:23 +0100 |
commit | 12e15a3d287135b30e46446ee81b77e48d8d840d (patch) | |
tree | ad32fddd7fea27a0fe88882ccb66f9114fa45cb7 /tests | |
parent | cf1ebd8406722ab53e28d2dd3c5c00445ed478b6 (diff) | |
download | at-spi2-atk-12e15a3d287135b30e46446ee81b77e48d8d840d.tar.gz |
2008-09-25 Mark Doffman <mark.doffman@codethink.co.uk>
* tests/Makefile.am
configure.ac
For the moment remove the cspi tests. cspi
needs modification for it to be in working order again.
* tests/pyatspi/*
Add unit tests to 'make check'
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 2 | ||||
-rw-r--r-- | tests/pyatspi/Makefile.am | 8 | ||||
-rw-r--r-- | tests/pyatspi/accessibletest.py | 3 | ||||
-rw-r--r-- | tests/pyatspi/actiontest.py | 2 | ||||
-rw-r--r-- | tests/pyatspi/componenttest.py | 2 | ||||
-rw-r--r-- | tests/pyatspi/desktoptest.py | 2 | ||||
-rw-r--r-- | tests/pyatspi/relationtest.py | 2 | ||||
-rwxr-xr-x | tests/pyatspi/runtests.sh | 12 | ||||
-rw-r--r--[-rwxr-xr-x] | tests/pyatspi/setvars.sh | 0 | ||||
-rwxr-xr-x | tests/pyatspi/testrunner (renamed from tests/pyatspi/testrunner.py) | 2 |
10 files changed, 28 insertions, 7 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 239fd4b..10d902b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = dummyatk apps data cspi pyatspi +SUBDIRS = dummyatk apps data pyatspi #TESTS=testrunner.py TESTS_ENVIRONMENT = PYTHONPATH=$(abs_top_srcdir)/python \ diff --git a/tests/pyatspi/Makefile.am b/tests/pyatspi/Makefile.am index dbe32a8..97213ce 100644 --- a/tests/pyatspi/Makefile.am +++ b/tests/pyatspi/Makefile.am @@ -2,6 +2,7 @@ SUBDIRS = pasytest EXTRA_DIST = \ accessibletest.py\ + actiontest.py\ componenttest.py\ desktoptest.py\ statetest.py\ @@ -9,6 +10,11 @@ EXTRA_DIST = \ Makefile.in\ setvars.sh\ relationtest.py\ - testrunner.py + runtests.sh\ + testrunner + +TESTS_ENVIRONMENT = top_builddir=$(top_builddir) top_srcdir=$(top_srcdir) + +TESTS = runtests.sh CLEANFILES = *.pyc diff --git a/tests/pyatspi/accessibletest.py b/tests/pyatspi/accessibletest.py index 3867883..d94e0af 100644 --- a/tests/pyatspi/accessibletest.py +++ b/tests/pyatspi/accessibletest.py @@ -55,7 +55,8 @@ class AccessibleTest(_PasyTest): self._path = path def setup(self, test): - self._registry = pyatspi.registry.Registry(self._path) + self._registry = pyatspi.Registry() + print self._path self._desktop = self._registry.getDesktop(0) def test_name(self, test): diff --git a/tests/pyatspi/actiontest.py b/tests/pyatspi/actiontest.py index 870bf19..405f898 100644 --- a/tests/pyatspi/actiontest.py +++ b/tests/pyatspi/actiontest.py @@ -26,7 +26,7 @@ class ActionTest(_PasyTest): self._path = path def setup(self, test): - self._registry = pyatspi.registry.Registry(self._path) + self._registry = pyatspi.Registry() self._desktop = self._registry.getDesktop(0) def test_nActions(self, test): diff --git a/tests/pyatspi/componenttest.py b/tests/pyatspi/componenttest.py index 28a66f3..c6a9253 100644 --- a/tests/pyatspi/componenttest.py +++ b/tests/pyatspi/componenttest.py @@ -44,7 +44,7 @@ class ComponentTest(_PasyTest): self._path = path def setup(self, test): - self._registry = pyatspi.registry.Registry(self._path) + self._registry = pyatspi.Registry() self._desktop = self._registry.getDesktop(0) def test_contains(self, test): diff --git a/tests/pyatspi/desktoptest.py b/tests/pyatspi/desktoptest.py index 8266220..409f634 100644 --- a/tests/pyatspi/desktoptest.py +++ b/tests/pyatspi/desktoptest.py @@ -46,7 +46,7 @@ class DesktopTest(_PasyTest): self._path = path def setup(self, test): - self._registry = pyatspi.registry.Registry(self._path) + self._registry = pyatspi.Registry() self._desktop = self._registry.getDesktop(0) def test_name(self, test): diff --git a/tests/pyatspi/relationtest.py b/tests/pyatspi/relationtest.py index 6f93b14..77ce31c 100644 --- a/tests/pyatspi/relationtest.py +++ b/tests/pyatspi/relationtest.py @@ -25,7 +25,7 @@ class RelationTest(_PasyTest): self._path = path def setup(self, test): - self._registry = pyatspi.registry.Registry(self._path) + self._registry = pyatspi.Registry() self._desktop = self._registry.getDesktop(0) self._root = self._desktop[0] self._rset = self._root.getRelationSet() diff --git a/tests/pyatspi/runtests.sh b/tests/pyatspi/runtests.sh new file mode 100755 index 0000000..eec34d9 --- /dev/null +++ b/tests/pyatspi/runtests.sh @@ -0,0 +1,12 @@ +export PYTHONPATH=$top_srcdir + +export TEST_DATA_DIRECTORY=$top_srcdir/tests/data +export TEST_ATSPI_LIBRARY=$top_builddir/atk-adaptor/.libs/libspiatk.so +export TEST_MODULES_DIRECTORY=$top_builddir/tests/apps/.libs +export TEST_APPLICATION=$top_builddir/tests/apps/test-application + +$top_srcdir/tests/pyatspi/testrunner -l libaccessibleapp.so -m accessibletest -n AccessibleTest +$top_srcdir/tests/pyatspi/testrunner -l libactionapp.so -m actiontest -n ActionTest +$top_srcdir/tests/pyatspi/testrunner -l libcomponentapp.so -m componenttest -n ComponentTest +$top_srcdir/tests/pyatspi/testrunner -l librelationapp.so -m relationtest -n RelationTest +$top_srcdir/tests/pyatspi/testrunner -l libaccessibleapp.so -m statetest -n StateTest diff --git a/tests/pyatspi/setvars.sh b/tests/pyatspi/setvars.sh index d9638a2..d9638a2 100755..100644 --- a/tests/pyatspi/setvars.sh +++ b/tests/pyatspi/setvars.sh diff --git a/tests/pyatspi/testrunner.py b/tests/pyatspi/testrunner index b74929e..92531e2 100755 --- a/tests/pyatspi/testrunner.py +++ b/tests/pyatspi/testrunner @@ -3,6 +3,7 @@ import gobject import dbus import sys +import os import time from random import randint @@ -72,6 +73,7 @@ def main(argv): test = dbus.Interface(to, "org.codethink.atspi.test") # Run the test script here + os.environ["ATSPI_TEST_APP_NAME"] = name module = __import__(options.test_module) test_class = getattr(module, options.test_name) test_object = test_class(bus, name) |