changeset 18500:f0124a65e8f8 stable

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.
author Mads Kiilerich <madski@unity3d.com>
date Tue, 29 Jan 2013 20:03:51 +0100
parents d07834e52b4e
children a3b2dc1aa909
files tests/run-tests.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Tue Jan 29 15:25:33 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():