Author: Carl Friedrich Bolz <cfb...@gmx.de>
Branch: py3.5-refactor-sys_exc_info
Changeset: r88424:106e9a48e6a9
Date: 2016-11-17 08:53 +0000
http://bitbucket.org/pypy/pypy/changeset/106e9a48e6a9/

Log:    (arigo) when running 'py.test -A', detect complete crashes of
        CPython too

diff --git a/pypy/tool/pytest/apptest.py b/pypy/tool/pytest/apptest.py
--- a/pypy/tool/pytest/apptest.py
+++ b/pypy/tool/pytest/apptest.py
@@ -172,7 +172,8 @@
         f.write('\n'.join(defs))
         f.write('def %s():\n' % target_name)
         f.write('\n'.join(source))
-        f.write("\n%s()\n" % target_name)
+        f.write("\ntry:\n    %s()\n" % target_name)
+        f.write('finally:\n    print("===aefwuiheawiu===")')
     helper_dir = os.path.join(pypydir, 'tool', 'cpyext')
     env = os.environ.copy()
     env['PYTHONPATH'] = helper_dir
@@ -186,6 +187,8 @@
                      (python_, usemodules))
     elif res > 0:
         raise AssertionError("Subprocess failed:\n" + stderr)
+    elif "===aefwuiheawiu===" not in stdout:
+        raise AssertionError("%r crashed:\n%s" % (python_, stderr))
 
 
 def extract_docstring_if_empty_function(fn):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to