python testrunner/pypyjit_tests.py
in dir /build_dir/pypy-c-jit-linux-aarch64/build (timeout 4000 secs)
watching logfiles {'pytestLog': 'pypyjit_new.log'}
argv: ['python', 'testrunner/pypyjit_tests.py']
environment:
AUDITWHEEL_ARCH=aarch64
AUDITWHEEL_PLAT=manylinux2014_aarch64
AUDITWHEEL_POLICY=manylinux2014
DEVTOOLSET_ROOTPATH=/opt/rh/devtoolset-10/root
HOME=/home/buildslave
HOSTNAME=530e0d063b5c
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_ALL=en_US.UTF-8
LD_LIBRARY_PATH=/usr/local/lib:/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib:/opt/rh/devtoolset-10/root/usr/lib64/dyninst:/opt/rh/devtoolset-10/root/usr/lib/dyninst:/usr/local/lib64
LOGNAME=buildslave
PATH=/python27_virt/bin:/opt/rh/devtoolset-10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig
PWD=/build_dir/pypy-c-jit-linux-aarch64/build
PYPY_GC_NURSERY=16M
PYPY_LOCALBASE=/usr/local
PYPY_MAKE_PORTABLE=1
SHELL=/bin/bash
SHLVL=2
SSL_CERT_FILE=/opt/_internal/certs.pem
TERM=xterm
TMPDIR=/tmp/pytest
USER=buildslave
_=/python27_virt/bin/buildslave
using PTY: False
============================= test session starts ==============================
platform linux2 -- Python 2.7.18[pypy-8.0.0-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
pytest-2.9.2 from /build_dir/pypy-c-jit-linux-aarch64/build/pytest.pyc
rootdir: /build_dir/pypy-c-jit-linux-aarch64/build, inifile: pytest.ini
collected 1207 items
pypy/module/pypyjit/test_pypy_c/test_00_model.py .........................
pypy/module/pypyjit/test_pypy_c/test_alloc.py ...................................................
pypy/module/pypyjit/test_pypy_c/test_array.py ....s..
pypy/module/pypyjit/test_pypy_c/test_boolrewrite.py ......................................................................................................................................................................................................................................................................................................................................
pypy/module/pypyjit/test_pypy_c/test_buffers.py ..
pypy/module/pypyjit/test_pypy_c/test_bug.py .
pypy/module/pypyjit/test_pypy_c/test_call.py ..........................
pypy/module/pypyjit/test_pypy_c/test_containers.py ......................
pypy/module/pypyjit/test_pypy_c/test_cprofile.py .
pypy/module/pypyjit/test_pypy_c/test_exception.py .....
pypy/module/pypyjit/test_pypy_c/test_ffi.py s..s......
pypy/module/pypyjit/test_pypy_c/test_generators.py ...
pypy/module/pypyjit/test_pypy_c/test_getframe.py ..
pypy/module/pypyjit/test_pypy_c/test_globals.py .
pypy/module/pypyjit/test_pypy_c/test_import.py ..
pypy/module/pypyjit/test_pypy_c/test_instance.py ................
pypy/module/pypyjit/test_pypy_c/test_intbound.py ..................................................................................................................................................................................................................................................................................
pypy/module/pypyjit/test_pypy_c/test_jitlogparser.py F
pypy/module/pypyjit/test_pypy_c/test_math.py ..s..
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssFFFFFFFF
pypy/module/pypyjit/test_pypy_c/test_min_max.py ...
pypy/module/pypyjit/test_pypy_c/test_misc.py .......................
pypy/module/pypyjit/test_pypy_c/test_shift.py ...........................................................................................................................................................................................................................
pypy/module/pypyjit/test_pypy_c/test_string.py ................
pypy/module/pypyjit/test_pypy_c/test_struct.py ......
pypy/module/pypyjit/test_pypy_c/test_thread.py ...
pypy/module/pypyjit/test_pypy_c/test_weakref.py .
=================================== FAILURES ===================================
______________________________ TestLogParser.test ______________________________
self = <pypy.module.pypyjit.test_pypy_c.test_jitlogparser.TestLogParser object at 0x000000002ac4ccd0>
def test(self):
def fn_with_bridges(N):
def is_prime(x):
for y in xrange(2, x):
if x % y == 0:
return False
return True
result = 0
for x in xrange(N):
if x % 3 == 0:
result += 5
elif x % 5 == 0:
result += 3
elif is_prime(x):
result += x
elif x == 99:
result *= 2
return result
#
N = 10000
_log = self.run(fn_with_bridges, [N])
log, loops = import_log(_log.logfile)
parse_log_counts(extract_category(log, 'jit-backend-count'), loops)
is_prime_loops = []
fn_with_bridges_loops = []
bridges = {}
lib_re = re.compile("file '.*lib-python.*'")
for loop in loops:
if hasattr(loop, 'force_asm'):
try:
> loop.force_asm()
pypy/module/pypyjit/test_pypy_c/test_jitlogparser.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
rpython/tool/jitlogparser/parser.py:472: in <lambda>
dump_start=start_ofs))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <rpython.tool.jitlogparser.parser.SimpleParser object at 0x000000002a70de18>
loop = <rpython.jit.tool.oparser_model.ExtendedTreeLoop object at 0x000000002a70d9b8>
backend_dump = '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...79bef270ffdff21000e0f200023fd6b0d3ff58b00b00f910ac82d2f079bef270ffdff2b01300f9100080d2f079bef270ffdff21000e0f200023fd6'
backend_tp = 'arm', dump_start = 281457592309104L
def postprocess(self, loop, backend_dump=None, backend_tp=None,
dump_start=0):
if backend_dump is not None:
raw_asm = self._asm_disassemble(backend_dump.decode('hex'),
backend_tp, dump_start)
# additional mess: if the backend_dump starts with a series
# of zeros, raw_asm's first regular line is *after* that,
# after a line saying "...". So we assume that start==dump_start
# if this parameter was passed.
asm = []
start = dump_start
for elem in raw_asm:
if len(elem.split("\t")) < 3:
continue
e = elem.split("\t")
adr = e[0]
v = elem # --- more compactly: " ".join(e[2:])
if not start: # only if 'dump_start' is left at 0
start = int(adr.strip(":"), 16)
ofs = int(adr.strip(":"), 16) - start
if ofs >= 0:
asm.append((ofs, v.strip("\n")))
asm_index = 0
for i, op in enumerate(loop.operations):
end = 0
j = i + 1
while end == 0:
if j == len(loop.operations):
end = loop.last_offset
break
if loop.operations[j].offset is None:
j += 1
else:
end = loop.operations[j].offset
if op.offset is not None:
> while asm[asm_index][0] < op.offset:
E IndexError: list index out of range
rpython/tool/jitlogparser/parser.py:141: IndexError
----------------------------- Captured stdout call -----------------------------
loading symbols from /build_dir/pypy-c-jit-linux-aarch64/build/pypy/goal/pypy-c...
22 symbols found
----------------------------- Captured stderr call -----------------------------
0%..loaded
____________________ TestMicroNumPy.test_reduce_logical_xor ____________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000000002923a138>
def test_reduce_logical_xor(self):
def main():
import _numpypy.multiarray as np
import _numpypy.umath as um
arr = np.array([1.0] * 1500)
return um.logical_xor.reduce(arr)
> log = self.run(main, [])
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:146:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000000002923a138>
func_or_src = <function main at 0x0000000029477cb8>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x000000002923a170>, funcname = 'main'
arglist = ''
f = <closed file '/tmp/pytest/usession-main-4467/test-pypy-jit/test_reduce_logical_xor.py', mode 'w' at 0x0000000029477d30>
logfile = local('/tmp/pytest/usession-main-4467/test-pypy-jit/test_reduce_logical_xor.log')
cmdline = ['/build_dir/pypy-c-jit-linux-aarch64/build/pypy/goal/pypy-c', '-S', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/pytest/usession-main-4467/test-pypy-jit/test_reduce_logical_xor.py']
key = 'disable_unrolling'
def run(self, func_or_src, args=[], import_site=False,
discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
jitopts.setdefault('disable_unrolling', 9999)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
funcname = func_or_src.func_name
else:
funcname = 'main'
# write the snippet
arglist = ', '.join(map(repr, args))
with self.filepath.open("w") as f:
# we don't want to see the small bridges created
# by the checkinterval reaching the limit
f.write("import sys\n")
f.write("sys.setcheckinterval(10000000)\n")
f.write(str(src) + "\n")
f.write("print %s(%s)\n" % (funcname, arglist))
#
# run a child pypy-c with logging enabled
logfile = self.filepath.new(ext='.log')
#
cmdline = [sys.executable]
if not import_site:
cmdline.append('-S')
if jitopts:
jitcmdline = ['%s=%s' % (key, value)
for key, value in jitopts.items()]
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
env = os.environ.copy()
# TODO old logging system
env['PYPYLOG'] = self.log_string + ':' + str(logfile)
jitlogfile = str(logfile) + '.jlog'
env['JITLOG'] = str(jitlogfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = pipe.communicate()
if pipe.wait() < 0:
raise IOError("subprocess was killed by signal %d" % (
pipe.returncode,))
if stderr.startswith('SKIP:'):
py.test.skip(stderr)
#if stderr.startswith('debug_alloc.h:'): # lldebug builds
# stderr = ''
#assert not stderr
if stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy/module/pypyjit/test_pypy_c/test_00_model.py:88: SyntaxError
----------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "/tmp/pytest/usession-main-4467/test-pypy-jit/test_reduce_logical_xor.py", line 8, in <module>
print main()
File "/tmp/pytest/usession-main-4467/test-pypy-jit/test_reduce_logical_xor.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
____________________ TestMicroNumPy.test_reduce_logical_and ____________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000029572838>
def test_reduce_logical_and(self):
def main():
import _numpypy.multiarray as np
import _numpypy.umath as um
arr = np.array([1.0] * 1500)
return um.logical_and.reduce(arr)
> log = self.run(main, [])
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:206:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000029572838>
func_or_src = <function main at 0x00000000292391f0>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x0000000029572870>, funcname = 'main'
arglist = ''
f = <closed file '/tmp/pytest/usession-main-4467/test-pypy-jit/test_reduce_logical_and.py', mode 'w' at 0x0000000029239268>
logfile = local('/tmp/pytest/usession-main-4467/test-pypy-jit/test_reduce_logical_and.log')
cmdline = ['/build_dir/pypy-c-jit-linux-aarch64/build/pypy/goal/pypy-c', '-S', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/pytest/usession-main-4467/test-pypy-jit/test_reduce_logical_and.py']
key = 'disable_unrolling'
def run(self, func_or_src, args=[], import_site=False,
discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
jitopts.setdefault('disable_unrolling', 9999)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
funcname = func_or_src.func_name
else:
funcname = 'main'
# write the snippet
arglist = ', '.join(map(repr, args))
with self.filepath.open("w") as f:
# we don't want to see the small bridges created
# by the checkinterval reaching the limit
f.write("import sys\n")
f.write("sys.setcheckinterval(10000000)\n")
f.write(str(src) + "\n")
f.write("print %s(%s)\n" % (funcname, arglist))
#
# run a child pypy-c with logging enabled
logfile = self.filepath.new(ext='.log')
#
cmdline = [sys.executable]
if not import_site:
cmdline.append('-S')
if jitopts:
jitcmdline = ['%s=%s' % (key, value)
for key, value in jitopts.items()]
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
env = os.environ.copy()
# TODO old logging system
env['PYPYLOG'] = self.log_string + ':' + str(logfile)
jitlogfile = str(logfile) + '.jlog'
env['JITLOG'] = str(jitlogfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = pipe.communicate()
if pipe.wait() < 0:
raise IOError("subprocess was killed by signal %d" % (
pipe.returncode,))
if stderr.startswith('SKIP:'):
py.test.skip(stderr)
#if stderr.startswith('debug_alloc.h:'): # lldebug builds
# stderr = ''
#assert not stderr
if stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy/module/pypyjit/test_pypy_c/test_00_model.py:88: SyntaxError
----------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "/tmp/pytest/usession-main-4467/test-pypy-jit/test_reduce_logical_and.py", line 8, in <module>
print main()
File "/tmp/pytest/usession-main-4467/test-pypy-jit/test_reduce_logical_and.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
___________________ TestMicroNumPy.test_array_getitem_basic ____________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000028a50b48>
def test_array_getitem_basic(self):
def main():
import _numpypy.multiarray as np
arr = np.zeros((300, 300))
x = 150
y = 0
while y < 300:
a = arr[x, y]
y += 1
return a
> log = self.run(main, [])
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:262:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000028a50b48>
func_or_src = <function main at 0x000000002953a7a0>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x0000000028a50b80>, funcname = 'main'
arglist = ''
f = <closed file '/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_getitem_basic.py', mode 'w' at 0x000000002953a818>
logfile = local('/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_getitem_basic.log')
cmdline = ['/build_dir/pypy-c-jit-linux-aarch64/build/pypy/goal/pypy-c', '-S', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_getitem_basic.py']
key = 'disable_unrolling'
def run(self, func_or_src, args=[], import_site=False,
discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
jitopts.setdefault('disable_unrolling', 9999)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
funcname = func_or_src.func_name
else:
funcname = 'main'
# write the snippet
arglist = ', '.join(map(repr, args))
with self.filepath.open("w") as f:
# we don't want to see the small bridges created
# by the checkinterval reaching the limit
f.write("import sys\n")
f.write("sys.setcheckinterval(10000000)\n")
f.write(str(src) + "\n")
f.write("print %s(%s)\n" % (funcname, arglist))
#
# run a child pypy-c with logging enabled
logfile = self.filepath.new(ext='.log')
#
cmdline = [sys.executable]
if not import_site:
cmdline.append('-S')
if jitopts:
jitcmdline = ['%s=%s' % (key, value)
for key, value in jitopts.items()]
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
env = os.environ.copy()
# TODO old logging system
env['PYPYLOG'] = self.log_string + ':' + str(logfile)
jitlogfile = str(logfile) + '.jlog'
env['JITLOG'] = str(jitlogfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = pipe.communicate()
if pipe.wait() < 0:
raise IOError("subprocess was killed by signal %d" % (
pipe.returncode,))
if stderr.startswith('SKIP:'):
py.test.skip(stderr)
#if stderr.startswith('debug_alloc.h:'): # lldebug builds
# stderr = ''
#assert not stderr
if stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy/module/pypyjit/test_pypy_c/test_00_model.py:88: SyntaxError
----------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_getitem_basic.py", line 12, in <module>
print main()
File "/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_getitem_basic.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
_________________ TestMicroNumPy.test_array_getitem_accumulate _________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x00000000287c9478>
def test_array_getitem_accumulate(self):
"""Check that operations/ufuncs on array items are jitted correctly"""
def main():
import _numpypy.multiarray as np
arr = np.zeros((300, 300))
a = 0.0
x = 150
y = 0
while y < 300:
a += arr[x, y]
y += 1
return a
> log = self.run(main, [])
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:302:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x00000000287c9478>
func_or_src = <function main at 0x000000002953bbc8>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x00000000287c94b0>, funcname = 'main'
arglist = ''
f = <closed file '/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_getitem_accumulate.py', mode 'w' at 0x000000002953bc40>
logfile = local('/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_getitem_accumulate.log')
cmdline = ['/build_dir/pypy-c-jit-linux-aarch64/build/pypy/goal/pypy-c', '-S', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_getitem_accumulate.py']
key = 'disable_unrolling'
def run(self, func_or_src, args=[], import_site=False,
discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
jitopts.setdefault('disable_unrolling', 9999)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
funcname = func_or_src.func_name
else:
funcname = 'main'
# write the snippet
arglist = ', '.join(map(repr, args))
with self.filepath.open("w") as f:
# we don't want to see the small bridges created
# by the checkinterval reaching the limit
f.write("import sys\n")
f.write("sys.setcheckinterval(10000000)\n")
f.write(str(src) + "\n")
f.write("print %s(%s)\n" % (funcname, arglist))
#
# run a child pypy-c with logging enabled
logfile = self.filepath.new(ext='.log')
#
cmdline = [sys.executable]
if not import_site:
cmdline.append('-S')
if jitopts:
jitcmdline = ['%s=%s' % (key, value)
for key, value in jitopts.items()]
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
env = os.environ.copy()
# TODO old logging system
env['PYPYLOG'] = self.log_string + ':' + str(logfile)
jitlogfile = str(logfile) + '.jlog'
env['JITLOG'] = str(jitlogfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = pipe.communicate()
if pipe.wait() < 0:
raise IOError("subprocess was killed by signal %d" % (
pipe.returncode,))
if stderr.startswith('SKIP:'):
py.test.skip(stderr)
#if stderr.startswith('debug_alloc.h:'): # lldebug builds
# stderr = ''
#assert not stderr
if stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy/module/pypyjit/test_pypy_c/test_00_model.py:88: SyntaxError
----------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_getitem_accumulate.py", line 13, in <module>
print main()
File "/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_getitem_accumulate.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
___________________ TestMicroNumPy.test_array_flatiter_next ____________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000026674a68>
def test_array_flatiter_next(self):
def main():
import _numpypy.multiarray as np
arr = np.zeros((1024, 16)) + 42
ai = arr.flat
i = 0
while i < arr.size:
a = next(ai)
i += 1
return a
> log = self.run(main, [])
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:341:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000026674a68>
func_or_src = <function main at 0x0000000028381100>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x0000000026674aa0>, funcname = 'main'
arglist = ''
f = <closed file '/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_flatiter_next.py', mode 'w' at 0x0000000028381178>
logfile = local('/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_flatiter_next.log')
cmdline = ['/build_dir/pypy-c-jit-linux-aarch64/build/pypy/goal/pypy-c', '-S', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_flatiter_next.py']
key = 'disable_unrolling'
def run(self, func_or_src, args=[], import_site=False,
discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
jitopts.setdefault('disable_unrolling', 9999)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
funcname = func_or_src.func_name
else:
funcname = 'main'
# write the snippet
arglist = ', '.join(map(repr, args))
with self.filepath.open("w") as f:
# we don't want to see the small bridges created
# by the checkinterval reaching the limit
f.write("import sys\n")
f.write("sys.setcheckinterval(10000000)\n")
f.write(str(src) + "\n")
f.write("print %s(%s)\n" % (funcname, arglist))
#
# run a child pypy-c with logging enabled
logfile = self.filepath.new(ext='.log')
#
cmdline = [sys.executable]
if not import_site:
cmdline.append('-S')
if jitopts:
jitcmdline = ['%s=%s' % (key, value)
for key, value in jitopts.items()]
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
env = os.environ.copy()
# TODO old logging system
env['PYPYLOG'] = self.log_string + ':' + str(logfile)
jitlogfile = str(logfile) + '.jlog'
env['JITLOG'] = str(jitlogfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = pipe.communicate()
if pipe.wait() < 0:
raise IOError("subprocess was killed by signal %d" % (
pipe.returncode,))
if stderr.startswith('SKIP:'):
py.test.skip(stderr)
#if stderr.startswith('debug_alloc.h:'): # lldebug builds
# stderr = ''
#assert not stderr
if stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy/module/pypyjit/test_pypy_c/test_00_model.py:88: SyntaxError
----------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_flatiter_next.py", line 12, in <module>
print main()
File "/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_flatiter_next.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
______________ TestMicroNumPy.test_array_flatiter_getitem_single _______________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000027ccc988>
def test_array_flatiter_getitem_single(self):
def main():
import _numpypy.multiarray as np
arr = np.zeros((1024, 16)) + 42
ai = arr.flat
i = 0
while i < arr.size:
a = ai[i] # ID: getitem
i += 1
return a
> log = self.run(main, [])
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:373:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000027ccc988>
func_or_src = <function main at 0x0000000026fd05c0>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x0000000027ccc9c0>, funcname = 'main'
arglist = ''
f = <closed file '/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_flatiter_getitem_single.py', mode 'w' at 0x0000000026fd0638>
logfile = local('/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_flatiter_getitem_single.log')
cmdline = ['/build_dir/pypy-c-jit-linux-aarch64/build/pypy/goal/pypy-c', '-S', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_flatiter_getitem_single.py']
key = 'disable_unrolling'
def run(self, func_or_src, args=[], import_site=False,
discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
jitopts.setdefault('disable_unrolling', 9999)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
funcname = func_or_src.func_name
else:
funcname = 'main'
# write the snippet
arglist = ', '.join(map(repr, args))
with self.filepath.open("w") as f:
# we don't want to see the small bridges created
# by the checkinterval reaching the limit
f.write("import sys\n")
f.write("sys.setcheckinterval(10000000)\n")
f.write(str(src) + "\n")
f.write("print %s(%s)\n" % (funcname, arglist))
#
# run a child pypy-c with logging enabled
logfile = self.filepath.new(ext='.log')
#
cmdline = [sys.executable]
if not import_site:
cmdline.append('-S')
if jitopts:
jitcmdline = ['%s=%s' % (key, value)
for key, value in jitopts.items()]
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
env = os.environ.copy()
# TODO old logging system
env['PYPYLOG'] = self.log_string + ':' + str(logfile)
jitlogfile = str(logfile) + '.jlog'
env['JITLOG'] = str(jitlogfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = pipe.communicate()
if pipe.wait() < 0:
raise IOError("subprocess was killed by signal %d" % (
pipe.returncode,))
if stderr.startswith('SKIP:'):
py.test.skip(stderr)
#if stderr.startswith('debug_alloc.h:'): # lldebug builds
# stderr = ''
#assert not stderr
if stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy/module/pypyjit/test_pypy_c/test_00_model.py:88: SyntaxError
----------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_flatiter_getitem_single.py", line 12, in <module>
print main()
File "/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_flatiter_getitem_single.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
______________ TestMicroNumPy.test_array_flatiter_setitem_single _______________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000029f91328>
def test_array_flatiter_setitem_single(self):
def main():
import _numpypy.multiarray as np
arr = np.empty((1024, 16))
ai = arr.flat
i = 0
while i < arr.size:
ai[i] = 42.0
i += 1
return ai[-1]
> log = self.run(main, [])
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:395:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x0000000029f91328>
func_or_src = <function main at 0x0000000026fd1a60>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x0000000029f91360>, funcname = 'main'
arglist = ''
f = <closed file '/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_flatiter_setitem_single.py', mode 'w' at 0x0000000026fd1ad8>
logfile = local('/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_flatiter_setitem_single.log')
cmdline = ['/build_dir/pypy-c-jit-linux-aarch64/build/pypy/goal/pypy-c', '-S', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_flatiter_setitem_single.py']
key = 'disable_unrolling'
def run(self, func_or_src, args=[], import_site=False,
discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
jitopts.setdefault('disable_unrolling', 9999)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
funcname = func_or_src.func_name
else:
funcname = 'main'
# write the snippet
arglist = ', '.join(map(repr, args))
with self.filepath.open("w") as f:
# we don't want to see the small bridges created
# by the checkinterval reaching the limit
f.write("import sys\n")
f.write("sys.setcheckinterval(10000000)\n")
f.write(str(src) + "\n")
f.write("print %s(%s)\n" % (funcname, arglist))
#
# run a child pypy-c with logging enabled
logfile = self.filepath.new(ext='.log')
#
cmdline = [sys.executable]
if not import_site:
cmdline.append('-S')
if jitopts:
jitcmdline = ['%s=%s' % (key, value)
for key, value in jitopts.items()]
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
env = os.environ.copy()
# TODO old logging system
env['PYPYLOG'] = self.log_string + ':' + str(logfile)
jitlogfile = str(logfile) + '.jlog'
env['JITLOG'] = str(jitlogfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = pipe.communicate()
if pipe.wait() < 0:
raise IOError("subprocess was killed by signal %d" % (
pipe.returncode,))
if stderr.startswith('SKIP:'):
py.test.skip(stderr)
#if stderr.startswith('debug_alloc.h:'): # lldebug builds
# stderr = ''
#assert not stderr
if stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy/module/pypyjit/test_pypy_c/test_00_model.py:88: SyntaxError
----------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_flatiter_setitem_single.py", line 12, in <module>
print main()
File "/tmp/pytest/usession-main-4467/test-pypy-jit/test_array_flatiter_setitem_single.py", line 4, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
________________________ TestMicroNumPy.test_mixed_div _________________________
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x00000000296a6b80>
def test_mixed_div(self):
N = 1500
def main():
N = 1500
import _numpypy.multiarray as np
arr = np.zeros(N)
l = [arr[i]/2. for i in range(N)]
return l
> log = self.run(main, [])
pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:427:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x00000000296a6b80>
func_or_src = <function main at 0x0000000029f9b010>, args = []
import_site = False, discard_stdout_before_last_line = False
jitopts = {'disable_unrolling': 9999, 'threshold': 200}
src = <py._code.source.Source object at 0x00000000296a6bb8>, funcname = 'main'
arglist = ''
f = <closed file '/tmp/pytest/usession-main-4467/test-pypy-jit/test_mixed_div.py', mode 'w' at 0x0000000029f9b088>
logfile = local('/tmp/pytest/usession-main-4467/test-pypy-jit/test_mixed_div.log')
cmdline = ['/build_dir/pypy-c-jit-linux-aarch64/build/pypy/goal/pypy-c', '-S', '--jit', 'threshold=200,disable_unrolling=9999', '/tmp/pytest/usession-main-4467/test-pypy-jit/test_mixed_div.py']
key = 'disable_unrolling'
def run(self, func_or_src, args=[], import_site=False,
discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
jitopts.setdefault('disable_unrolling', 9999)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
funcname = func_or_src.func_name
else:
funcname = 'main'
# write the snippet
arglist = ', '.join(map(repr, args))
with self.filepath.open("w") as f:
# we don't want to see the small bridges created
# by the checkinterval reaching the limit
f.write("import sys\n")
f.write("sys.setcheckinterval(10000000)\n")
f.write(str(src) + "\n")
f.write("print %s(%s)\n" % (funcname, arglist))
#
# run a child pypy-c with logging enabled
logfile = self.filepath.new(ext='.log')
#
cmdline = [sys.executable]
if not import_site:
cmdline.append('-S')
if jitopts:
jitcmdline = ['%s=%s' % (key, value)
for key, value in jitopts.items()]
cmdline += ['--jit', ','.join(jitcmdline)]
cmdline.append(str(self.filepath))
#
env = os.environ.copy()
# TODO old logging system
env['PYPYLOG'] = self.log_string + ':' + str(logfile)
jitlogfile = str(logfile) + '.jlog'
env['JITLOG'] = str(jitlogfile)
pipe = subprocess.Popen(cmdline,
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = pipe.communicate()
if pipe.wait() < 0:
raise IOError("subprocess was killed by signal %d" % (
pipe.returncode,))
if stderr.startswith('SKIP:'):
py.test.skip(stderr)
#if stderr.startswith('debug_alloc.h:'): # lldebug builds
# stderr = ''
#assert not stderr
if stderr:
print '*** stderr of the subprocess: ***'
print stderr
#
if discard_stdout_before_last_line:
stdout = stdout.splitlines(True)[-1]
#
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile), verbose=False)
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
log = Log(rawtraces)
> log.result = eval(stdout)
E File "<string>", line 0
E
E ^
E SyntaxError: invalid syntax
pypy/module/pypyjit/test_pypy_c/test_00_model.py:88: SyntaxError
----------------------------- Captured stdout call -----------------------------
*** stderr of the subprocess: ***
Traceback (most recent call last):
File "/tmp/pytest/usession-main-4467/test-pypy-jit/test_mixed_div.py", line 9, in <module>
print main()
File "/tmp/pytest/usession-main-4467/test-pypy-jit/test_mixed_div.py", line 5, in main
import _numpypy.multiarray as np
ImportError: No module named _numpypy
=========================== short test summary info ============================
FAIL pypy/module/pypyjit/test_pypy_c/test_jitlogparser.py::TestLogParser::()::test
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_reduce_logical_xor
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_reduce_logical_and
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_array_getitem_basic
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_array_getitem_accumulate
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_array_flatiter_next
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_array_flatiter_getitem_single
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_array_flatiter_setitem_single
FAIL pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_mixed_div
============= 9 failed, 1046 passed, 152 skipped in 73.21 seconds ==============
program finished with exit code 1
elapsedTime=73.671668