summaryrefslogtreecommitdiff
path: root/test/dbus_python_check.py
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <quinticent@phuket.(none)>2006-07-12 21:28:39 -0400
committerJohn (J5) Palmieri <quinticent@phuket.(none)>2006-07-12 21:28:39 -0400
commit7a0389c01ac8c775b7b677bcc20cc0da716b1c19 (patch)
treecb5e85392161814e6f7e630facca0448dae13eb2 /test/dbus_python_check.py
parent303a9d690767dd40e75940f9e3c4e1d1fa504554 (diff)
downloaddbus-python-7a0389c01ac8c775b7b677bcc20cc0da716b1c19.tar.gz
* Add tests back
* create a check command for distutils (python setup.py check)
Diffstat (limited to 'test/dbus_python_check.py')
-rw-r--r--test/dbus_python_check.py48
1 files changed, 48 insertions, 0 deletions
diff --git a/test/dbus_python_check.py b/test/dbus_python_check.py
new file mode 100644
index 0000000..fb6f010
--- /dev/null
+++ b/test/dbus_python_check.py
@@ -0,0 +1,48 @@
+"""dbus_python_check
+
+Implements the Distutils 'check' command.
+"""
+
+# created 2006/07/12, John (J5) Palmieri
+
+__revision__ = "0.1"
+
+from distutils.core import Command
+from distutils.command.build import build
+from distutils.dist import Distribution
+import os
+
+class dbus_python_check (Command):
+
+ # Brief (40-50 characters) description of the command
+ description = "Runs tests in this package"
+
+ # List of option tuples: long name, short name (None if no short
+ # name), and help string.
+ user_options = [('help', '?',
+ "Shows Help"),
+ ]
+
+
+ def initialize_options (self):
+ self.dummy = None
+
+ # initialize_options()
+
+
+ def finalize_options (self):
+ pass
+ # finalize_options()
+
+ def run (self):
+ b = build(self.distribution)
+ b.finalize_options()
+ b.run()
+ top_builddir = os.path.join (os.getcwd(), b.build_lib)
+ cmd = 'DBUS_TOP_BUILDDIR="%s" test/run-test.sh'%top_builddir
+ print cmd
+ os.system (cmd)
+
+ # run()
+
+# class check