|
|
|
|
@ -24,6 +24,7 @@ itself from the command line. There are two ways of running this script:
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
# Imports
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
from __future__ import print_function
|
|
|
|
|
|
|
|
|
|
# Stdlib
|
|
|
|
|
import glob
|
|
|
|
|
@ -423,7 +424,7 @@ class IPTester(object):
|
|
|
|
|
|
|
|
|
|
for pid in self.pids:
|
|
|
|
|
try:
|
|
|
|
|
print 'Cleaning stale PID:', pid
|
|
|
|
|
print('Cleaning stale PID:', pid)
|
|
|
|
|
os.kill(pid, signal.SIGKILL)
|
|
|
|
|
except OSError:
|
|
|
|
|
# This is just a best effort, if we fail or the process was
|
|
|
|
|
@ -527,8 +528,8 @@ def run_iptestall():
|
|
|
|
|
t_start = time.time()
|
|
|
|
|
try:
|
|
|
|
|
for (name, runner) in runners:
|
|
|
|
|
print '*'*70
|
|
|
|
|
print 'IPython test group:',name
|
|
|
|
|
print('*'*70)
|
|
|
|
|
print('IPython test group:',name)
|
|
|
|
|
res = runner.run()
|
|
|
|
|
if res:
|
|
|
|
|
failed.append( (name, runner) )
|
|
|
|
|
@ -539,26 +540,26 @@ def run_iptestall():
|
|
|
|
|
nrunners = len(runners)
|
|
|
|
|
nfail = len(failed)
|
|
|
|
|
# summarize results
|
|
|
|
|
print
|
|
|
|
|
print '*'*70
|
|
|
|
|
print 'Test suite completed for system with the following information:'
|
|
|
|
|
print report()
|
|
|
|
|
print 'Ran %s test groups in %.3fs' % (nrunners, t_tests)
|
|
|
|
|
print
|
|
|
|
|
print 'Status:'
|
|
|
|
|
print()
|
|
|
|
|
print('*'*70)
|
|
|
|
|
print('Test suite completed for system with the following information:')
|
|
|
|
|
print(report())
|
|
|
|
|
print('Ran %s test groups in %.3fs' % (nrunners, t_tests))
|
|
|
|
|
print()
|
|
|
|
|
print('Status:')
|
|
|
|
|
if not failed:
|
|
|
|
|
print 'OK'
|
|
|
|
|
print('OK')
|
|
|
|
|
else:
|
|
|
|
|
# If anything went wrong, point out what command to rerun manually to
|
|
|
|
|
# see the actual errors and individual summary
|
|
|
|
|
print 'ERROR - %s out of %s test groups failed.' % (nfail, nrunners)
|
|
|
|
|
print('ERROR - %s out of %s test groups failed.' % (nfail, nrunners))
|
|
|
|
|
for name, failed_runner in failed:
|
|
|
|
|
print '-'*40
|
|
|
|
|
print 'Runner failed:',name
|
|
|
|
|
print 'You may wish to rerun this one individually, with:'
|
|
|
|
|
print('-'*40)
|
|
|
|
|
print('Runner failed:',name)
|
|
|
|
|
print('You may wish to rerun this one individually, with:')
|
|
|
|
|
failed_call_args = [py3compat.cast_unicode(x) for x in failed_runner.call_args]
|
|
|
|
|
print u' '.join(failed_call_args)
|
|
|
|
|
print
|
|
|
|
|
print(u' '.join(failed_call_args))
|
|
|
|
|
print()
|
|
|
|
|
# Ensure that our exit code indicates failure
|
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
|
|
|