From: Mark Doffman Date: Tue, 30 Sep 2008 01:32:23 +0000 (+0100) Subject: 2008-09-25 Mark Doffman X-Git-Tag: AT_SPI2_ATK_2_12_0~590 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=12e15a3d287135b30e46446ee81b77e48d8d840d;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git 2008-09-25 Mark Doffman * 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' --- diff --git a/configure.ac b/configure.ac index 371c33f..0249064 100644 --- a/configure.ac +++ b/configure.ac @@ -190,7 +190,6 @@ AC_CONFIG_FILES([Makefile atk-adaptor/Makefile login-helper/Makefile tests/dummyatk/Makefile - tests/cspi/Makefile tests/data/Makefile tests/pyatspi/Makefile tests/pyatspi/pasytest/Makefile diff --git a/pyatspi/Makefile.am b/pyatspi/Makefile.am index 3979bbc..c204ab4 100644 --- a/pyatspi/Makefile.am +++ b/pyatspi/Makefile.am @@ -1,4 +1,6 @@ +pyatspidir = $(pythondir)/pyatspi pyatspi_PYTHON = \ + Accessibility.py \ accessible.py \ action.py \ application.py \ @@ -31,6 +33,4 @@ pyatspi_PYTHON = \ utils.py \ value.py -pyatspidir=$(pyexecdir)/pyatspi - CLEANFILES = *.pyc 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 old mode 100755 new mode 100644 diff --git a/tests/pyatspi/testrunner.py b/tests/pyatspi/testrunner similarity index 98% rename from tests/pyatspi/testrunner.py rename to 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)