atk-adaptor/Makefile
login-helper/Makefile
tests/dummyatk/Makefile
- tests/cspi/Makefile
tests/data/Makefile
tests/pyatspi/Makefile
tests/pyatspi/pasytest/Makefile
+pyatspidir = $(pythondir)/pyatspi
pyatspi_PYTHON = \
+ Accessibility.py \
accessible.py \
action.py \
application.py \
utils.py \
value.py
-pyatspidir=$(pyexecdir)/pyatspi
-
CLEANFILES = *.pyc
-SUBDIRS = dummyatk apps data cspi pyatspi
+SUBDIRS = dummyatk apps data pyatspi
#TESTS=testrunner.py
TESTS_ENVIRONMENT = PYTHONPATH=$(abs_top_srcdir)/python \
EXTRA_DIST = \
accessibletest.py\
+ actiontest.py\
componenttest.py\
desktoptest.py\
statetest.py\
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
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):
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):
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):
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):
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()
--- /dev/null
+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
--- /dev/null
+#!/usr/bin/python
+
+import gobject
+import dbus
+import sys
+import os
+import time
+from random import randint
+
+from optparse import OptionParser
+from pasytest import PasyTest
+
+from dbus.mainloop.glib import DBusGMainLoop
+
+DBusGMainLoop(set_as_default=True)
+
+def run_test_app(module_name, dbus_name=None, wait_for_debug=False):
+ import os
+ from subprocess import Popen
+
+ test_data_directory = os.environ["TEST_DATA_DIRECTORY"]
+ test_modules_directory = os.environ["TEST_MODULES_DIRECTORY"]
+ test_atspi_library = os.environ["TEST_ATSPI_LIBRARY"]
+ test_application = os.environ["TEST_APPLICATION"]
+
+ test_module = os.path.join(test_modules_directory, module_name)
+
+ if (dbus_name):
+ print " ".join([test_application,
+ "--atspi-dbus-name", dbus_name,
+ "--test-atspi-library", test_atspi_library,
+ "--test-module", test_module,
+ "--test-data-directory", test_data_directory,])
+ pop = Popen([test_application,
+ "--atspi-dbus-name", dbus_name,
+ "--test-atspi-library", test_atspi_library,
+ "--test-module", test_module,
+ "--test-data-directory", test_data_directory,])
+ else:
+ print " ".join([test_application,
+ "--test-atspi-library", test_atspi_library,
+ "--test-module", test_module,
+ "--test-data-directory", test_data_directory,])
+ pop = Popen([test_application,
+ "--test-atspi-library", test_atspi_library,
+ "--test-module", test_module,
+ "--test-data-directory", test_data_directory,])
+
+ wait_message = """
+ The test application %s has been started with PID %d.
+
+ To continue the test press ENTER.\n\n
+ """
+ if (wait_for_debug):
+ raw_input(wait_message % (module_name, pop.pid))
+
+def main(argv):
+ parser = OptionParser()
+ parser.add_option("-l", "--library", dest="test_library")
+ parser.add_option("-m", "--module", dest="test_module")
+ parser.add_option("-n", "--name", dest="test_name")
+ parser.add_option("-w", "--wait", action="store_true", dest="wait", default=False)
+ (options, args) = parser.parse_args()
+
+ bus = dbus.SessionBus()
+ name = "test.atspi.R" + str(randint(1, 1000))
+
+ app = run_test_app(options.test_library, name, wait_for_debug=options.wait)
+ time.sleep(1)
+ print "Started test app on bus name %s" % (name,)
+
+ to = bus.get_object(name, "/org/codethink/atspi/test")
+ 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)
+ test_object.run()
+
+ loop = gobject.MainLoop()
+
+ def finished_handler():
+ loop.quit()
+ print "\n" + test_object.report() + "\n"
+ test.finish()
+
+ test_object.events.finished += finished_handler
+
+ loop.run()
+
+if __name__=="__main__":
+ sys.exit(main(sys.argv))
+++ /dev/null
-#!/usr/bin/python
-
-import gobject
-import dbus
-import sys
-import time
-from random import randint
-
-from optparse import OptionParser
-from pasytest import PasyTest
-
-from dbus.mainloop.glib import DBusGMainLoop
-
-DBusGMainLoop(set_as_default=True)
-
-def run_test_app(module_name, dbus_name=None, wait_for_debug=False):
- import os
- from subprocess import Popen
-
- test_data_directory = os.environ["TEST_DATA_DIRECTORY"]
- test_modules_directory = os.environ["TEST_MODULES_DIRECTORY"]
- test_atspi_library = os.environ["TEST_ATSPI_LIBRARY"]
- test_application = os.environ["TEST_APPLICATION"]
-
- test_module = os.path.join(test_modules_directory, module_name)
-
- if (dbus_name):
- print " ".join([test_application,
- "--atspi-dbus-name", dbus_name,
- "--test-atspi-library", test_atspi_library,
- "--test-module", test_module,
- "--test-data-directory", test_data_directory,])
- pop = Popen([test_application,
- "--atspi-dbus-name", dbus_name,
- "--test-atspi-library", test_atspi_library,
- "--test-module", test_module,
- "--test-data-directory", test_data_directory,])
- else:
- print " ".join([test_application,
- "--test-atspi-library", test_atspi_library,
- "--test-module", test_module,
- "--test-data-directory", test_data_directory,])
- pop = Popen([test_application,
- "--test-atspi-library", test_atspi_library,
- "--test-module", test_module,
- "--test-data-directory", test_data_directory,])
-
- wait_message = """
- The test application %s has been started with PID %d.
-
- To continue the test press ENTER.\n\n
- """
- if (wait_for_debug):
- raw_input(wait_message % (module_name, pop.pid))
-
-def main(argv):
- parser = OptionParser()
- parser.add_option("-l", "--library", dest="test_library")
- parser.add_option("-m", "--module", dest="test_module")
- parser.add_option("-n", "--name", dest="test_name")
- parser.add_option("-w", "--wait", action="store_true", dest="wait", default=False)
- (options, args) = parser.parse_args()
-
- bus = dbus.SessionBus()
- name = "test.atspi.R" + str(randint(1, 1000))
-
- app = run_test_app(options.test_library, name, wait_for_debug=options.wait)
- time.sleep(1)
- print "Started test app on bus name %s" % (name,)
-
- to = bus.get_object(name, "/org/codethink/atspi/test")
- test = dbus.Interface(to, "org.codethink.atspi.test")
-
- # Run the test script here
- module = __import__(options.test_module)
- test_class = getattr(module, options.test_name)
- test_object = test_class(bus, name)
- test_object.run()
-
- loop = gobject.MainLoop()
-
- def finished_handler():
- loop.quit()
- print "\n" + test_object.report() + "\n"
- test.finish()
-
- test_object.events.finished += finished_handler
-
- loop.run()
-
-if __name__=="__main__":
- sys.exit(main(sys.argv))