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:20:07 -0400 |
commit | fca43ccd474db550cd68c17a9a03fc9436128b34 (patch) | |
tree | bfc25085ab2b5607a6d7c64e668fe35ed08df6f6 /make-test | |
parent | e1813976a57ffaabbc537b6784732d5eade40210 (diff) | |
download | freeipa-fca43ccd474db550cd68c17a9a03fc9436128b34.tar.gz freeipa-fca43ccd474db550cd68c17a9a03fc9436128b34.tar.xz freeipa-fca43ccd474db550cd68c17a9a03fc9436128b34.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
Diffstat (limited to 'make-test')
-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) |