#286 Allow running the test suite with python setup.py test
Merged 6 years ago by puiterwijk. Opened 6 years ago by puiterwijk.
puiterwijk/ipsilon setuppytest  into  master

file modified
+17 -2
@@ -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 @@ 

               '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}

  )

LGTM.

BTW, I reported https://pagure.io/pagure/issue/2519 while trying to review this one. I presume these changes were made to setup.py?

Commit 3cab24a fixes this pull-request

Pull-Request has been merged by patrick@puiterwijk.org

6 years ago
Metadata