translator/c/test/test_newgc.py::TestIncrementalMiniMarkGC::()::test_framework_varsized
cls = <class 'rpython.translator.c.test.test_newgc.TestIncrementalMiniMarkGC'>
def setup_class(cls):
funcs0 = []
funcs1 = []
funcsstr = []
name_to_func = {}
for fullname in dir(cls):
if not fullname.startswith('define'):
continue
keyword = option.keyword
if keyword.startswith('test_') and not keyword.endswith(':'):
keyword = keyword[len('test_'):]
if keyword not in fullname:
continue
prefix, name = fullname.split('_', 1)
definefunc = getattr(cls, fullname)
func = definefunc.im_func(cls)
func.__name__ = 'f_' + name
if prefix == 'definestr':
funcsstr.append(func)
funcs0.append(None)
funcs1.append(None)
else:
numargs = len(inspect.getargspec(func)[0])
funcsstr.append(None)
if numargs == 0:
funcs0.append(func)
funcs1.append(None)
else:
assert numargs == 1
funcs0.append(None)
funcs1.append(func)
assert name not in name_to_func
name_to_func[name] = len(name_to_func)
assert name_to_func
def allfuncs(name, arg):
num = name_to_func[name]
func0 = funcs0[num]
if func0:
return str(func0())
func1 = funcs1[num]
if func1:
return str(func1(arg))
funcstr = funcsstr[num]
if funcstr:
return funcstr(arg)
assert 0, 'unreachable'
cls.funcsstr = funcsstr
> cls.c_allfuncs = staticmethod(cls._makefunc_str_int(allfuncs))
translator\c\test\test_newgc.py:117:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
translator\c\test\test_newgc.py:58: in _makefunc_str_int
exename = t.compile()
translator\interactive.py:117: in compile
getattr(self.driver, 'compile_' + backend)()
translator\driver.py:108: in proc
return self.proceed(backend_goal)
translator\driver.py:569: in proceed
result = self._execute(goals, task_skip = self._maybe_skip())
translator\tool\taskengine.py:114: in _execute
res = self._do(goal, taskcallable, *args, **kwds)
translator\driver.py:278: in _do
res = func()
translator\driver.py:536: in task_compile_c
cbuilder.compile(**kwds)
translator\c\genc.py:341: in compile
extra_opts)
translator\platform\windows.py:574: in execute_makefile
self._handle_error(returncode, stdout, stderr, path.join('make'))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <MsvcPlatform cc=cl.exe>, returncode = 2
stdout = '\tcl.exe stdafx.c /c /nologo /MD /O2 -DPYPY_MAKEFILE /Ycstdafx.h /Fpstdafx.pch /FIstdafx.h /I/include /I"D:\\a\\pyp...ython_memory_gc.c(2146): error C2037: left of \'ullTotalPhys\' specifies undefined struct/union \'MEMORYSTATUSEX\'\r\n'
stderr = '\tcl.exe stdafx.c /c /nologo /MD /O2 -DPYPY_MAKEFILE /Ycstdafx.h /Fpstdafx.pch /FIstdafx.h /I/include /I"D:\\a\\pyp...a\\pypy\\pypy\\rpython"\\translator\\c /I"D:\\a\\pypy\\pypy\\rpython"\\rlib\\src\' : return code \'0x2\'\r\nStop.\r\n'
outname = local('c:\\users\\runner~1\\appdata\\local\\temp\\usession-pypy-HEAD-12\\testing_2\\make')
def _handle_error(self, returncode, stdout, stderr, outname):
if returncode != 0:
# Microsoft compilers write compilation errors to stdout
stderr = stdout + stderr
errorfile = outname.new(ext='errors')
errorfile.write(stderr, mode='wb')
if self.log_errors:
stderrlines = stderr.splitlines()
for line in stderrlines:
log.Error(line)
# ^^^ don't use ERROR, because it might actually be fine.
# Also, ERROR confuses lib-python/conftest.py.
> raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(err="""
E cl.exe stdafx.c /c /nologo /MD /O2 -DPYPY_MAKEFILE /Ycstdafx.h /Fpstdafx.pch /FIstdafx.h /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E stdafx.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fotesting_2.obj /c testing_2.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E testing_2.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fodata_rpython_flowspace.obj /c data_rpython_flowspace.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E data_rpython_flowspace.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fodata_rpython_memory_gc.obj /c data_rpython_memory_gc.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E data_rpython_memory_gc.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fodata_rpython_memory_gctransform.obj /c data_rpython_memory_gctransform.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E data_rpython_memory_gctransform.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fodata_rpython_memory_test.obj /c data_rpython_memory_test.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E data_rpython_memory_test.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fodata_rpython_rlib.obj /c data_rpython_rlib.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E data_rpython_rlib.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fodata_rpython_rtyper.obj /c data_rpython_rtyper.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E data_rpython_rtyper.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fodata_rpython_rtyper_lltypesystem.obj /c data_rpython_rtyper_lltypesystem.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E data_rpython_rtyper_lltypesystem.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fodata_rpython_translator_c_test.obj /c data_rpython_translator_c_test.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E data_rpython_translator_c_test.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fononfuncnodes.obj /c nonfuncnodes.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E nonfuncnodes.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fononfuncnodes_1.obj /c nonfuncnodes_1.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E nonfuncnodes_1.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fononfuncnodes_2.obj /c nonfuncnodes_2.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E nonfuncnodes_2.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fononfuncnodes_3.obj /c nonfuncnodes_3.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E nonfuncnodes_3.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fononfuncnodes_4.obj /c nonfuncnodes_4.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E nonfuncnodes_4.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fononfuncnodes_5.obj /c nonfuncnodes_5.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E nonfuncnodes_5.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fodata_rpython_memory_gc_1.obj /c data_rpython_memory_gc_1.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E data_rpython_memory_gc_1.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fodata_rpython_rlib_1.obj /c data_rpython_rlib_1.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E data_rpython_rlib_1.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fodata_rpython_rtyper_lltypesystem_1.obj /c data_rpython_rtyper_lltypesystem_1.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E data_rpython_rtyper_lltypesystem_1.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Fodata_rpython_translator_c_test_1.obj /c data_rpython_translator_c_test_1.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E data_rpython_translator_c_test_1.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Foimplement.obj /c implement.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E implement.c
E implement.c(154): warning C4133: 'function': incompatible types - from 'MEMORYSTATUSEX *' to 'LPMEMORYSTATUSEX'
E implement.c(4122): warning C4047: 'function': 'va_list *' differs in levels of indirection from 'char *'
E implement.c(4122): warning C4024: 'FormatMessageW': different types for formal and actual parameter 7
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Forpython_flowspace.obj /c rpython_flowspace.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E rpython_flowspace.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Forpython_memory.obj /c rpython_memory.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E rpython_memory.c
E cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Forpython_memory_gc.obj /c rpython_memory_gc.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src
E rpython_memory_gc.c
E rpython_memory_gc.c(2112): error C2027: use of undefined type 'MEMORYSTATUSEX'
E c:\Users\runneradmin\AppData\Local\Temp\usession-pypy-HEAD-12\testing_2\singleheader.h(5072): note: see declaration of 'MEMORYSTATUSEX'
E rpython_memory_gc.c(2138): error C2027: use of undefined type 'MEMORYSTATUSEX'
E c:\Users\runneradmin\AppData\Local\Temp\usession-pypy-HEAD-12\testing_2\singleheader.h(5072): note: see declaration of 'MEMORYSTATUSEX'
E rpython_memory_gc.c(2139): error C2037: left of 'dwLength' specifies undefined struct/union 'MEMORYSTATUSEX'
E rpython_memory_gc.c(2146): error C2037: left of 'ullTotalPhys' specifies undefined struct/union 'MEMORYSTATUSEX'
E NMAKE : fatal error U1077: 'cl.exe /nologo /MD /O2 -DPYPY_MAKEFILE /Yustdafx.h /Fpstdafx.pch /FIstdafx.h /Forpython_memory_gc.obj /c rpython_memory_gc.c /I/include /I"D:\a\pypy\pypy\rpython"\translator\c /I"D:\a\pypy\pypy\rpython"\rlib\src' : return code '0x2'
E Stop.
E """)
translator\platform\windows.py:319: CompilationError
builder: rpython-win-x86-64 build #765*
test: translator/c/test/test_newgc.py::TestIncrementalMiniMarkGC::()::test_framework_varsized