|
|
|
|
@ -29,8 +29,9 @@ import subprocess
|
|
|
|
|
import time
|
|
|
|
|
|
|
|
|
|
from .iptest import have, test_group_names as py_test_group_names, test_sections
|
|
|
|
|
from IPython.utils.path import compress_user
|
|
|
|
|
from IPython.utils.py3compat import bytes_to_str
|
|
|
|
|
from IPython.utils.sysinfo import sys_info
|
|
|
|
|
from IPython.utils.sysinfo import get_sys_info
|
|
|
|
|
from IPython.utils.tempdir import TemporaryDirectory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -270,8 +271,20 @@ def do_run(controller):
|
|
|
|
|
|
|
|
|
|
def report():
|
|
|
|
|
"""Return a string with a summary report of test-related variables."""
|
|
|
|
|
inf = get_sys_info()
|
|
|
|
|
out = []
|
|
|
|
|
def _add(name, value):
|
|
|
|
|
out.append((name, value))
|
|
|
|
|
|
|
|
|
|
out = [ sys_info(), '\n']
|
|
|
|
|
_add('IPython version', inf['ipython_version'])
|
|
|
|
|
_add('IPython commit', "{} ({})".format(inf['commit_hash'], inf['commit_source']))
|
|
|
|
|
_add('IPython package', compress_user(inf['ipython_path']))
|
|
|
|
|
_add('Python version', inf['sys_version'].replace('\n',''))
|
|
|
|
|
_add('sys.executable', compress_user(inf['sys_executable']))
|
|
|
|
|
_add('Platform', inf['platform'])
|
|
|
|
|
|
|
|
|
|
width = max(len(n) for (n,v) in out)
|
|
|
|
|
out = ["{:<{width}}: {}\n".format(n, v, width=width) for (n,v) in out]
|
|
|
|
|
|
|
|
|
|
avail = []
|
|
|
|
|
not_avail = []
|
|
|
|
|
@ -385,17 +398,16 @@ def run_iptestall(options):
|
|
|
|
|
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()
|
|
|
|
|
took = "Took %.3fs." % t_tests
|
|
|
|
|
print('Status: ', end='')
|
|
|
|
|
if not failed:
|
|
|
|
|
print('OK')
|
|
|
|
|
print('OK (%d test groups).' % nrunners, took)
|
|
|
|
|
else:
|
|
|
|
|
# If anything went wrong, point out what command to rerun manually to
|
|
|
|
|
# see the actual errors and individual summary
|
|
|
|
|
failed_sections = [c.section for c in failed]
|
|
|
|
|
print('ERROR - {} out of {} test groups failed ({}).'.format(nfail,
|
|
|
|
|
nrunners, ', '.join(failed_sections)))
|
|
|
|
|
nrunners, ', '.join(failed_sections)), took)
|
|
|
|
|
print()
|
|
|
|
|
print('You may wish to rerun these, with:')
|
|
|
|
|
print(' iptest', *failed_sections)
|
|
|
|
|
|