Author: Carl Friedrich Bolz <cfb...@gmx.de> Branch: guard-compatible Changeset: r85127:d3b59f1f5ac9 Date: 2016-05-24 10:54 +0200 http://bitbucket.org/pypy/pypy/changeset/d3b59f1f5ac9/
Log: (arigo, cfbolz): to make the tests check both paths, return True or False randomly from we_are_jitted diff --git a/rpython/rlib/jit.py b/rpython/rlib/jit.py --- a/rpython/rlib/jit.py +++ b/rpython/rlib/jit.py @@ -1,4 +1,5 @@ import sys +import random import py @@ -381,7 +382,9 @@ def we_are_jitted(): """ Considered as true during tracing and blackholing, so its consquences are reflected into jitted code """ - return False + # during testing we return something randomly, to emulate the real + # behaviour where you can switch to tracing a arbitrary points. + return random.random() > 0.5 _we_are_jitted = CDefinedIntSymbolic('0 /* we are not jitted here */', default=0) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit