From 3cab24a636b58ebef5c843640f125e6e9518cfec Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Aug 15 2017 10:00:47 +0000 Subject: Allow running the test suite with python setup.py test Merges: #286 Signed-off-by: Patrick Uiterwijk Reviewed-by: Randy Barlow --- diff --git a/setup.py b/setup.py index 3508e65..973740a 100755 --- a/setup.py +++ b/setup.py @@ -2,11 +2,25 @@ # # Copyright (C) 2014 Ipsilon project Contributors, for license see COPYING -from distutils.core import setup +from distutils.core import setup, Command from glob import glob +import os DATA = 'share/ipsilon/' +class TestCommand(Command): + description = 'Run test suite' + user_options = [] + + def initialize_options(self): + pass + + def finalize_options(self): + pass + + def run(self): + os.system("make") + setup( name='ipsilon', version='2.0.2', @@ -60,5 +74,6 @@ setup( 'ipsilon/install/ipsilon-db2conf', 'ipsilon/install/ipsilon-upgrade-database', 'ipsilon/install/ipsilon-server-install', - 'ipsilon/install/ipsilon-client-install'] + 'ipsilon/install/ipsilon-client-install'], + cmdclass={'test': TestCommand} )