Commit 0d493795 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

regrtest: always show before/after of modified env (#1407) (#1409)

Buildbots don't run tests with -vv and so only log "xxx was modified
by test_xxx" which is not enough to debug such random issue. In many
cases, I'm unable to reproduce the warning and so unable to fix it.

Always logging the value before and value after should help to debug
such warning on buildbots.
(cherry picked from commit ec4b1723)
(cherry picked from commit 22982350235f8c5821b71661a5616423e1c7fcc0)
parent d1c862ff
......@@ -901,10 +901,9 @@ class saved_test_environment:
print >>sys.stderr, (
"Warning -- {} was modified by {}".format(
name, self.testname))
if self.verbose > 1 and not self.pgo:
print >>sys.stderr, (
" Before: {}\n After: {} ".format(
original, current))
print >>sys.stderr, (
" Before: {}\n After: {} ".format(
original, current))
# XXX (ncoghlan): for most resources (e.g. sys.path) identity
# matters at least as much as value. For others (e.g. cwd),
# identity is irrelevant. Should we add a mechanism to check
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment