Skip to content

Commit d8b705f

Browse files
committed
test: previous releases: add v22.0
1 parent 40849ee commit d8b705f

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

ci/test/00_setup_env_native_qt5.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude fe
1414
export RUN_UNIT_TESTS_SEQUENTIAL="true"
1515
export RUN_UNIT_TESTS="false"
1616
export GOAL="install"
17-
export PREVIOUS_RELEASES_TO_DOWNLOAD="v0.15.2 v0.16.3 v0.17.2 v0.18.1 v0.19.1 v0.20.1 v0.21.0"
17+
export PREVIOUS_RELEASES_TO_DOWNLOAD="v0.15.2 v0.16.3 v0.17.2 v0.18.1 v0.19.1 v0.20.1 v0.21.0 v22.0"
1818
export BITCOIN_CONFIG="--enable-zmq --with-libs=no --with-gui=qt5 --enable-reduce-exports \
1919
--enable-debug --disable-fuzz-binary CFLAGS=\"-g0 -O2 -funsigned-char\" CXXFLAGS=\"-g0 -O2 -funsigned-char\" CC=gcc-8 CXX=g++-8"

test/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ test/functional/test_runner.py --extended
9898
In order to run backwards compatibility tests, download the previous node binaries:
9999

100100
```
101-
test/get_previous_releases.py -b v0.21.0 v0.20.1 v0.19.1 v0.18.1 v0.17.2 v0.16.3 v0.15.2
101+
test/get_previous_releases.py -b v22.0 v0.21.0 v0.20.1 v0.19.1 v0.18.1 v0.17.2 v0.16.3 v0.15.2
102102
```
103103

104104
By default, up to 4 tests will be run in parallel by test_runner. To specify

test/functional/feature_backwards_compatibility.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@
3434
class BackwardsCompatibilityTest(BitcoinTestFramework):
3535
def set_test_params(self):
3636
self.setup_clean_chain = True
37-
self.num_nodes = 8
37+
self.num_nodes = 9
3838
# Add new version after each release:
3939
self.extra_args = [
4040
["-addresstype=bech32"], # Pre-release: use to mine blocks
4141
["-nowallet", "-walletrbf=1", "-addresstype=bech32"], # Pre-release: use to receive coins, swap wallets, etc
42+
["-nowallet", "-walletrbf=1", "-addresstype=bech32"], # v22.0
4243
["-nowallet", "-walletrbf=1", "-addresstype=bech32"], # v0.21.0
4344
["-nowallet", "-walletrbf=1", "-addresstype=bech32"], # v0.20.1
4445
["-nowallet", "-walletrbf=1", "-addresstype=bech32"], # v0.19.1
@@ -56,6 +57,7 @@ def setup_nodes(self):
5657
self.add_nodes(self.num_nodes, extra_args=self.extra_args, versions=[
5758
None,
5859
None,
60+
220000,
5961
210000,
6062
200100,
6163
190100,

test/functional/test_framework/test_framework.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -447,11 +447,15 @@ def add_nodes(self, num_nodes: int, extra_args=None, *, rpchost=None, binary=Non
447447
def get_bin_from_version(version, bin_name, bin_default):
448448
if not version:
449449
return bin_default
450+
if version > 219999:
451+
# Starting at client version 220000 the first two digits represent
452+
# the major version, e.g. v22.0 instead of v0.22.0.
453+
version *= 100
450454
return os.path.join(
451455
self.options.previous_releases_path,
452456
re.sub(
453-
r'\.0$',
454-
'', # remove trailing .0 for point releases
457+
r'\.0$' if version <= 219999 else r'(\.0){1,2}$',
458+
'', # Remove trailing dot for point releases, after 22.0 also remove double trailing dot.
455459
'v{}.{}.{}.{}'.format(
456460
(version % 100000000) // 1000000,
457461
(version % 1000000) // 10000,

test/get_previous_releases.py

+8
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@
5959
"695fb624fa6423f5da4f443b60763dd1d77488bfe5ef63760904a7b54e91298d": "bitcoin-0.21.0-osx64.tar.gz",
6060
"f8b2adfeae021a672effbc7bd40d5c48d6b94e53b2dd660f787340bf1a52e4e9": "bitcoin-0.21.0-riscv64-linux-gnu.tar.gz",
6161
"da7766775e3f9c98d7a9145429f2be8297c2672fe5b118fd3dc2411fb48e0032": "bitcoin-0.21.0-x86_64-linux-gnu.tar.gz",
62+
63+
"ac718fed08570a81b3587587872ad85a25173afa5f9fbbd0c03ba4d1714cfa3e": "bitcoin-22.0-aarch64-linux-gnu.tar.gz",
64+
"b8713c6c5f03f5258b54e9f436e2ed6d85449aa24c2c9972f91963d413e86311": "bitcoin-22.0-arm-linux-gnueabihf.tar.gz",
65+
"2744d199c3343b2d94faffdfb2c94d75a630ba27301a70e47b0ad30a7e0155e9": "bitcoin-22.0-osx64.tar.gz",
66+
"2cca5f99007d060aca9d8c7cbd035dfe2f040dd8200b210ce32cdf858479f70d": "bitcoin-22.0-powerpc64-linux-gnu.tar.gz",
67+
"91b1e012975c5a363b5b5fcc81b5b7495e86ff703ec8262d4b9afcfec633c30d": "bitcoin-22.0-powerpc64le-linux-gnu.tar.gz",
68+
"9cc3a62c469fe57e11485fdd32c916f10ce7a2899299855a2e479256ff49ff3c": "bitcoin-22.0-riscv64-linux-gnu.tar.gz",
69+
"59ebd25dd82a51638b7a6bb914586201e67db67b919b2a1ff08925a7936d1b16": "bitcoin-22.0-x86_64-linux-gnu.tar.gz",
6270
}
6371

6472

0 commit comments

Comments
 (0)