summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index d963517..13fc574 100644
--- a/setup.py
+++ b/setup.py
@@ -269,6 +269,25 @@ class bdist_rpm(_bdist_rpm):
return spec_file
+class test(Command):
+
+ user_options = []
+
+ def initialize_options(self):
+ pass
+
+ def finalize_options(self):
+ pass
+
+ def run(self):
+ build_cmd = self.get_finalized_command('build')
+ build_cmd.run()
+ sys.path.insert(0, build_cmd.build_lib)
+ sys.path.insert(0, 'tests')
+ import test_all
+ test_all.main([])
+
+
if __name__ == '__main__':
setup(
@@ -296,6 +315,7 @@ if __name__ == '__main__':
cmdclass={
'build_ext': build_ext,
'bdist_rpm': bdist_rpm,
+ 'test': test,
},
)