From fca43ccd474db550cd68c17a9a03fc9436128b34 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 4 Apr 2012 09:42:22 -0400 Subject: 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 --- make-test | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) (limited to 'make-test') diff --git a/make-test b/make-test index b429a7162..02a17db9c 100755 --- a/make-test +++ b/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) -- cgit