Don't try to distribute COPYING.AFL-2.1 and COPYING.GPL-2, which we no longer have...
[dbus-python-phuang.git] / test / dbus_python_check.py
blobf9ae9dfbff7b5755a8faa03338c4f0abe5cebd90
1 """dbus_python_check
3 Implements the Distutils 'check' command.
4 """
6 # Copyright (C) 2006 Red Hat Inc. <http://www.redhat.com/>
7 # created 2006/07/12, John (J5) Palmieri
9 # Permission is hereby granted, free of charge, to any person
10 # obtaining a copy of this software and associated documentation
11 # files (the "Software"), to deal in the Software without
12 # restriction, including without limitation the rights to use, copy,
13 # modify, merge, publish, distribute, sublicense, and/or sell copies
14 # of the Software, and to permit persons to whom the Software is
15 # furnished to do so, subject to the following conditions:
17 # The above copyright notice and this permission notice shall be
18 # included in all copies or substantial portions of the Software.
20 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27 # DEALINGS IN THE SOFTWARE.
29 __revision__ = "0.1"
31 from distutils.core import Command
32 from distutils.command.build import build
33 from distutils.dist import Distribution
34 import os
36 class dbus_python_check (Command):
38 # Brief (40-50 characters) description of the command
39 description = "Runs tests in this package"
41 # List of option tuples: long name, short name (None if no short
42 # name), and help string.
43 user_options = [('help', '?',
44 "Shows Help"),
48 def initialize_options (self):
49 self.dummy = None
51 # initialize_options()
54 def finalize_options (self):
55 pass
56 # finalize_options()
58 def run (self):
59 b = build(self.distribution)
60 b.finalize_options()
61 b.run()
62 top_builddir = os.path.join (os.getcwd(), b.build_lib)
63 cmd = 'DBUS_TOP_BUILDDIR="%s" test/run-test.sh'%top_builddir
64 print cmd
65 os.system (cmd)
67 # run()
69 # class check