1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
#!/usr/bin/python
# vim:fileencoding=utf-8
# (c) 2011 Michał Górny <mgorny@gentoo.org>
# Released under the terms of the 2-clause BSD license.
from distutils.core import setup, Command
import os.path, sys
sys.path.insert(0, os.path.dirname(__file__))
try:
from PMSTestSuite import PV
except ImportError:
PV = 'unknown'
class TestCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import unittest, doctest
import PMSTestSuite.cli
import PMSTestSuite.library
import PMSTestSuite.pm
import PMSTestSuite.pm.pkgcorepm
import PMSTestSuite.pm.portagepm
import PMSTestSuite.repository
tests = unittest.TestSuite()
tests.addTests(doctest.DocTestSuite(PMSTestSuite.cli))
tests.addTests(doctest.DocTestSuite(PMSTestSuite.library))
tests.addTests(doctest.DocTestSuite(PMSTestSuite.library.case))
tests.addTests(doctest.DocTestSuite(PMSTestSuite.pm))
tests.addTests(doctest.DocTestSuite(PMSTestSuite.pm.pkgcorepm))
tests.addTests(doctest.DocTestSuite(PMSTestSuite.pm.portagepm))
tests.addTests(doctest.DocTestSuite(PMSTestSuite.repository))
r = unittest.TextTestRunner()
res = r.run(tests)
sys.exit(0 if res.wasSuccessful() else 1)
setup(
name = 'pms-test-suite',
version = PV,
author = 'Michał Górny',
author_email = 'mgorny@gentoo.org',
url = 'http://www.gentoo.org/proj/en/qa/pms/pms-test-suite.xml',
packages = [
'PMSTestSuite',
'PMSTestSuite.library',
'PMSTestSuite.library.standard',
'PMSTestSuite.library.standard.basic',
'PMSTestSuite.library.test',
'PMSTestSuite.pm',
'PMSTestSuite.repository'
],
scripts = [
'pms-tester'
],
classifiers = [
'Development Status :: 2 - Pre-Alpha',
'Environment :: Console',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: BSD License',
'Operating System :: POSIX',
'Programming Language :: Python',
'Topic :: Software Development :: Quality Assurance',
'Topic :: Software Development :: Testing',
'Topic :: System :: Installation/Setup'
],
cmdclass = {
'test': TestCommand
}
)
|