run-tests.py: inherit PYTHONHASHSEED from environment if set stable
authorMads Kiilerich <madski@unity3d.com>
Tue, 29 Jan 2013 20:03:51 +0100
branchstable
changeset 1208 9bd54c35af97
parent 1206 9fb4b2c19bd8
child 1209 49ca5f6f1a95
child 1210 02c4186c3aca
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 ]
tests/run-tests.py
--- 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():