diff options
-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'], ) |