diff options
| author | jvoisin | 2015-11-25 12:24:43 +0100 |
|---|---|---|
| committer | jvoisin | 2015-11-25 12:49:23 +0100 |
| commit | 4de7342a67e3cf08dabf616e6bbf0bbbae2f507f (patch) | |
| tree | 95dedf75183cf27fc74331c3b7ad7b011b1e10a9 | |
| parent | 363d35a15106f3c9d7980ed7eeaa86d3bbae5a9a (diff) | |
`python setup.py test` will now run the testsuite
It's basically a simple wrapper around
`cd test/ ; python test.py --local`.
| -rwxr-xr-x | setup.py | 19 |
1 files changed, 18 insertions, 1 deletions
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | import os | 3 | import os |
| 4 | 4 | ||
| 5 | from distutils.core import setup | 5 | from distutils.core import setup, Command |
| 6 | from DistUtilsExtra.command import * | 6 | from DistUtilsExtra.command import * |
| 7 | 7 | ||
| 8 | __version__ = '0.5.3' | 8 | __version__ = '0.5.3' |
| @@ -13,6 +13,22 @@ __version__ = '0.5.3' | |||
| 13 | if os.path.exists('MANIFEST'): | 13 | if os.path.exists('MANIFEST'): |
| 14 | os.remove('MANIFEST') | 14 | os.remove('MANIFEST') |
| 15 | 15 | ||
| 16 | |||
| 17 | class PyTest(Command): | ||
| 18 | user_options = [] | ||
| 19 | def initialize_options(self): | ||
| 20 | pass | ||
| 21 | |||
| 22 | def finalize_options(self): | ||
| 23 | pass | ||
| 24 | |||
| 25 | def run(self): | ||
| 26 | import subprocess | ||
| 27 | import sys | ||
| 28 | os.chdir('test') | ||
| 29 | errno = subprocess.call([sys.executable, 'test.py', '--local']) | ||
| 30 | raise SystemExit(errno) | ||
| 31 | |||
| 16 | setup( | 32 | setup( |
| 17 | name='MAT', | 33 | name='MAT', |
| 18 | version=__version__, | 34 | version=__version__, |
| @@ -34,6 +50,7 @@ setup( | |||
| 34 | ('share/nautilus-python/extensions', ['nautilus/nautilus-mat.py']) | 50 | ('share/nautilus-python/extensions', ['nautilus/nautilus-mat.py']) |
| 35 | ], | 51 | ], |
| 36 | cmdclass={ | 52 | cmdclass={ |
| 53 | 'test': PyTest, | ||
| 37 | 'build': build_extra.build_extra, | 54 | 'build': build_extra.build_extra, |
| 38 | 'build_i18n': build_i18n.build_i18n, | 55 | 'build_i18n': build_i18n.build_i18n, |
| 39 | 'build_help': build_help.build_help, | 56 | 'build_help': build_help.build_help, |
