diff options
author | Petr Viktorin <pviktori@redhat.com> | 2012-04-04 09:42:22 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2012-04-11 22:24:56 -0400 |
commit | 05f90cfd20f828da239f5e8cc4f2af2c128b1274 (patch) | |
tree | f3a6279e83ceefd383774408c1937c28302fedc2 | |
parent | 82417290fce375ec31b515ab8c2c50bc1adce68a (diff) | |
download | freeipa-05f90cfd20f828da239f5e8cc4f2af2c128b1274.tar.gz freeipa-05f90cfd20f828da239f5e8cc4f2af2c128b1274.tar.xz freeipa-05f90cfd20f828da239f5e8cc4f2af2c128b1274.zip |
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
-rwxr-xr-x | make-test | 34 |
1 files changed, 6 insertions, 28 deletions
@@ -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) |