[PATCH 3 of 3] run-tests: stop allocating HGPORT3+HGPORT4

timeless timeless at mozdev.org
Wed Feb 17 14:43:10 EST 2016


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1455737924 0
#      Wed Feb 17 19:38:44 2016 +0000
# Node ID b453bdac4926011d646bde4eecd161221b524956
# Parent  9043cf6f4c845593820cfa3e8715b198159ffc44
run-tests: stop allocating HGPORT3+HGPORT4

The only consumer was test-treemanifest.t, which has been fixed.

In general, you should be able to use killdaemons.py to recycle
ports instead of going over 3 ports (HGPORT, HGPORT1, HGPORT2).

In the future, if you want to add a port, be sure to change
portneeded in _getport.

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -724,8 +724,6 @@
             self._portmap(0),
             self._portmap(1),
             self._portmap(2),
-            self._portmap(3),
-            self._portmap(4),
             (br'(?m)^(saved backup bundle to .*\.hg)( \(glob\))?$',
              br'\1 (glob)'),
             ]
@@ -749,9 +747,7 @@
         env['TESTTMP'] = self._testtmp
         env['HOME'] = self._testtmp
         # This number should match portneeded in _getport
-        # XXX currently it does not, this is a bug that will be fixed
-        # in the next commit.
-        for port in xrange(5):
+        for port in xrange(3):
             # This list should be parallel to _portmap in _getreplacements
             defineport(port)
         env["HGRCPATH"] = os.path.join(self._threadtmp, b'.hgrc')


More information about the Mercurial-devel mailing list