diff options
author | Sascha Silbe <sascha-pgp@silbe.org> | 2011-05-14 15:09:34 (GMT) |
---|---|---|
committer | Sascha Silbe <sascha-pgp@silbe.org> | 2011-05-14 15:09:34 (GMT) |
commit | 5c462c3b9cdba176baae6a161ff75c479ba34c12 (patch) | |
tree | 854afefecfb394fe837f3c0c11f22909a142e870 /setup.py | |
parent | 27e22c91d6da1896cc1eb72119f06c13e66b69fb (diff) |
setup.py: add 'test' command to invoke test suite
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -23,6 +23,8 @@ from distutils.core import Command, setup from distutils.util import convert_path import glob import os +import subprocess +import sys class install_dbus(Command): # pylint: disable=C0103,R0904 @@ -83,6 +85,21 @@ class install(_install): # pylint: disable=C0103,R0904 sub_commands = _install.sub_commands + [('install_dbus', None)] +class Test(Command): + """Command to run test suite""" + description = 'run test suite' + user_options = [] + + def initialize_options(self): + pass + + def finalize_options(self): + pass + + def run(self): + sys.exit(subprocess.call(['tests/runalltests.py'])) + + setup(name='gdatastore', version='0.1', #url='', @@ -90,7 +107,8 @@ setup(name='gdatastore', author='Sascha Silbe', author_email='sascha-pgp@silbe.org', license='GPLv3', - cmdclass={'install': install, 'install_dbus': install_dbus}, + cmdclass={'install': install, 'install_dbus': install_dbus, + 'test': Test}, packages=['gdatastore'], scripts=['bin/gdatastore-service'], ) |