run-tests.py: inherit PYTHONHASHSEED from environment if set
This makes it possible to fix the seed by using for instance
PYTHONHASHSEED=7 ./run-tests.py ...
This can be very convenient when trying to debug problems that are influenced
by hash values. Try different seed values until you find one that triggers the
bad behaviour and then keep that while debugging.
The value 0 will restore default Python behavior and disable randomization.
[ original upstream message ]
--- a/tests/run-tests.py Mon Jan 21 19:40:15 2013 +0100
+++ b/tests/run-tests.py Tue Jan 29 20:03:51 2013 +0100
@@ -1252,7 +1252,7 @@
os.environ['no_proxy'] = ''
os.environ['NO_PROXY'] = ''
os.environ['TERM'] = 'xterm'
- os.environ['PYTHONHASHSEED'] = 'random'
+ os.environ['PYTHONHASHSEED'] = os.environ.get('PYTHONHASHSEED', 'random')
# unset env related to hooks
for k in os.environ.keys():