From 7a0389c01ac8c775b7b677bcc20cc0da716b1c19 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Wed, 12 Jul 2006 21:28:39 -0400 Subject: * Add tests back * create a check command for distutils (python setup.py check) --- test/dbus_python_check.py | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 test/dbus_python_check.py (limited to 'test/dbus_python_check.py') 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 -- cgit v1.2.1