test: Make PORT_MIN in test runner configurable
This commit is contained in:
parent
7d4bc60f1f
commit
fa69588537
2 changed files with 5 additions and 2 deletions
|
@ -9,6 +9,7 @@ task:
|
||||||
MAKEJOBS: "-j9"
|
MAKEJOBS: "-j9"
|
||||||
CONFIGURE_OPTS: "--disable-dependency-tracking"
|
CONFIGURE_OPTS: "--disable-dependency-tracking"
|
||||||
GOAL: "install"
|
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_SIZE: "200M"
|
||||||
CCACHE_COMPRESS: 1
|
CCACHE_COMPRESS: 1
|
||||||
CCACHE_DIR: "/tmp/ccache_dir"
|
CCACHE_DIR: "/tmp/ccache_dir"
|
||||||
|
@ -37,6 +38,7 @@ task:
|
||||||
env:
|
env:
|
||||||
MAKEJOBS: "-j9"
|
MAKEJOBS: "-j9"
|
||||||
RUN_CI_ON_HOST: "1"
|
RUN_CI_ON_HOST: "1"
|
||||||
|
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_SIZE: "200M"
|
||||||
CCACHE_DIR: "/tmp/ccache_dir"
|
CCACHE_DIR: "/tmp/ccache_dir"
|
||||||
ccache_cache:
|
ccache_cache:
|
||||||
|
|
|
@ -7,13 +7,13 @@
|
||||||
from base64 import b64encode
|
from base64 import b64encode
|
||||||
from binascii import unhexlify
|
from binascii import unhexlify
|
||||||
from decimal import Decimal, ROUND_DOWN
|
from decimal import Decimal, ROUND_DOWN
|
||||||
|
from subprocess import CalledProcessError
|
||||||
import inspect
|
import inspect
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
from subprocess import CalledProcessError
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from . import coverage
|
from . import coverage
|
||||||
|
@ -228,10 +228,11 @@ def wait_until(predicate, *, attempts=float('inf'), timeout=float('inf'), lock=N
|
||||||
# The maximum number of nodes a single test can spawn
|
# The maximum number of nodes a single test can spawn
|
||||||
MAX_NODES = 12
|
MAX_NODES = 12
|
||||||
# Don't assign rpc or p2p ports lower than this
|
# 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
|
# The number of ports to "reserve" for p2p and rpc, each
|
||||||
PORT_RANGE = 5000
|
PORT_RANGE = 5000
|
||||||
|
|
||||||
|
|
||||||
class PortSeed:
|
class PortSeed:
|
||||||
# Must be initialized with a unique integer for each process
|
# Must be initialized with a unique integer for each process
|
||||||
n = None
|
n = None
|
||||||
|
|
Loading…
Reference in a new issue