according to http://web.archiveorange.com/archive/v/cZ0K2Jye2cyGARzh9OlA
after patch pypy/conftest.py, pytest.py now support --cc
option:
pytest.py --cc=mingw32-gcc
pypy/translator/test/test_exceptiontransform.py
but we still can not use --cc option on specify function:
pytest.py --cc=mingw32-gcc
pypy/translator/test/test_exceptiontransform.py::TestOOType::()::test_simple
this is how to add this support:
***
pypy-pypy-4a38b43757e3\_pytest\config.py Sat May 26 09:16:32
2012
--- pypy-pypy-4a38b43757e3.bookaa\_pytest\config.py Sat May 26
09:26:36 2012
***************
*** 157,162 ****
--- 157,164 ----
for arg in args + [current]:
if hasattr(arg, 'startswith') and
arg.startswith("--"):
continue
+ if arg.find('::') != -1:
+ arg = arg[:arg.find('::')]
anchor = current.join(arg, abs=1)
if anchor.check(): # we found some file object
self._path2confmods[None] =
self.getconftestmodules(anchor)
now we can do this:
pytest.py --cc=mingw32-gcc
pypy/translator/test/test_exceptiontransform.py::TestOOType::()::test_simple
and this
pypy>test_all.py --cc=mingw32-gcc
translator/test/test_exceptiontransform.py::TestOOType::()::test_simple
but, I can not pass the test, with or withou --cc option.
Error message:
E AssertionError: ilasm failed to
assemble (ilasm):
E
E Microsoft (R) .NET Framework IL Assembler. Version
2.0.50727.4927
E Copyright (c) Microsoft Corporation. All rights
reserved.
E Assembling 'e:\tem\usession-default-137\main.il' to
EXE --> 'e:\tem\usession-default-137\main.exe'
E Source file is ANSI
E
E ***** FAILURE *****
E
E e:\tem\usession-default-137\main.il(161) : error :
syntax error at token '[' in: call [mscorlib]System.Object
rpyexc_fetch_value()
any advice ?
thanks,
Bookaa
_______________________________________________
pypy-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-dev
You can set an environment variable CC i.e.
Then run your test. The compilation will try to use a compiler
called ming32.