3 Implements the Distutils 'check' command.
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.
31 from distutils
.core
import Command
32 from distutils
.command
.build
import build
33 from distutils
.dist
import Distribution
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', '?',
48 def initialize_options (self
):
51 # initialize_options()
54 def finalize_options (self
):
59 b
= build(self
.distribution
)
62 top_builddir
= os
.path
.join (os
.getcwd(), b
.build_lib
)
63 cmd
= 'DBUS_TOP_BUILDDIR="%s" test/run-test.sh'%top_builddir