Patchwork [1,of,8] tests: python hash seed is only relevant after failures - otherwise keep quiet

login
register
mail settings
Submitter Mads Kiilerich
Date Nov. 17, 2013, 4:28 p.m.
Message ID <aae11f56cbf23d977d8d.1384705737@localhost.localdomain>
Download mbox | patch
Permalink /patch/3008/
State Accepted
Commit 6a03695fa72a04235026fc6758c9bbccf9fb2345
Headers show

Comments

Mads Kiilerich - Nov. 17, 2013, 4:28 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1384703975 18000
#      Sun Nov 17 10:59:35 2013 -0500
# Branch stable
# Node ID aae11f56cbf23d977d8db733db4a0ccc609d071c
# Parent  cb466830826a5fb0eecd4428922c2618d6a1b8af
tests: python hash seed is only relevant after failures - otherwise keep quiet

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1139,6 +1139,8 @@  def runtests(options, tests):
         _checkhglib("Tested")
         print "# Ran %d tests, %d skipped, %d failed." % (
             tested, skipped + ignored, failed)
+        if results['!']:
+            print 'python hash seed:', os.environ['PYTHONHASHSEED']
         if options.time:
             outputtimes(options)
 
@@ -1190,7 +1192,6 @@  def main():
         # use a random python hash seed all the time
         # we do the randomness ourself to know what seed is used
         os.environ['PYTHONHASHSEED'] = str(random.getrandbits(32))
-        print 'python hash seed:', os.environ['PYTHONHASHSEED']
 
     global TESTDIR, HGTMP, INST, BINDIR, PYTHONDIR, COVERAGE_FILE
     TESTDIR = os.environ["TESTDIR"] = os.getcwd()