diff --git a/.cirrus.yml b/.cirrus.yml index 1b34aeb291..5f8d969c6f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -9,6 +9,7 @@ task: MAKEJOBS: "-j9" CONFIGURE_OPTS: "--disable-dependency-tracking" GOAL: "install" + TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache CCACHE_SIZE: "200M" CCACHE_COMPRESS: 1 CCACHE_DIR: "/tmp/ccache_dir" diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index cabb2182cb..d781d54811 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -9,6 +9,7 @@ from base64 import b64encode from binascii import unhexlify from decimal import Decimal, ROUND_DOWN import hashlib +from subprocess import CalledProcessError import inspect import json import logging @@ -16,7 +17,6 @@ import os import random import shutil import re -from subprocess import CalledProcessError import time from . import coverage @@ -261,10 +261,11 @@ def wait_until(predicate, *, attempts=float('inf'), timeout=float('inf'), sleep= # The maximum number of nodes a single test can spawn MAX_NODES = 15 # Don't assign rpc or p2p ports lower than this -PORT_MIN = 11000 +PORT_MIN = int(os.getenv('TEST_RUNNER_PORT_MIN', default=11000)) # The number of ports to "reserve" for p2p and rpc, each PORT_RANGE = 5000 + class PortSeed: # Must be initialized with a unique integer for each process n = None