mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Pass make-test arguments through to Nose
Currently, our test script forwards a select few command line arguments to nosetests. This patch removes the filtering, passing all arguments through. This allows things like disabling output redirection (--nocapture), dropping into a debugger (--pdb, --pdb-failures), coverage reporting (--with-cover, if installed), etc. https://fedorahosted.org/freeipa/ticket/2135
This commit is contained in:
parent
e1813976a5
commit
fca43ccd47
34
make-test
34
make-test
@ -16,38 +16,14 @@ nose = '/usr/bin/nosetests'
|
||||
ran = []
|
||||
fail = []
|
||||
|
||||
parser = optparse.OptionParser(
|
||||
usage='usage: %prog [MODULE...]',
|
||||
)
|
||||
parser.add_option('--stop',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='Stop running tests after the first error or failure',
|
||||
)
|
||||
parser.add_option('--pdb',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='Drop into debugger on errors',
|
||||
)
|
||||
parser.add_option('--pdb-failures',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='Drop into debugger on failures',
|
||||
)
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
cmd = [nose] + args + [
|
||||
cmd = [
|
||||
nose,
|
||||
'-v',
|
||||
'--with-doctest',
|
||||
'--doctest-tests',
|
||||
'--exclude=plugins',
|
||||
]
|
||||
if options.stop:
|
||||
cmd.append('--stop')
|
||||
if options.pdb:
|
||||
cmd.append('--pdb')
|
||||
if options.pdb_failures:
|
||||
cmd.append('--pdb-failures')
|
||||
cmd += sys.argv[1:]
|
||||
|
||||
|
||||
# This must be set so ipalib.api gets initialized property for tests:
|
||||
@ -60,7 +36,9 @@ for v in versions:
|
||||
pver = python + v
|
||||
if not path.isfile(pver):
|
||||
continue
|
||||
if 0 != call([pver] + cmd):
|
||||
command = [pver] + cmd
|
||||
print ' '.join(cmd)
|
||||
if 0 != call(cmd):
|
||||
fail.append(pver)
|
||||
ran.append(pver)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user