aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xci/test/05_before_script.sh2
-rwxr-xr-xcontrib/devtools/previous_release.sh152
-rwxr-xr-xtest/functional/feature_backwards_compatibility.py2
-rwxr-xr-xtest/functional/mempool_compatibility.py2
-rwxr-xr-xtest/functional/wallet_upgradewallet.py2
5 files changed, 4 insertions, 156 deletions
diff --git a/ci/test/05_before_script.sh b/ci/test/05_before_script.sh
index 057395eba6..131ea21677 100755
--- a/ci/test/05_before_script.sh
+++ b/ci/test/05_before_script.sh
@@ -48,6 +48,6 @@ if [ -z "$NO_DEPENDS" ]; then
fi
if [ -n "$PREVIOUS_RELEASES_TO_DOWNLOAD" ]; then
BEGIN_FOLD previous-versions
- DOCKER_EXEC contrib/devtools/previous_release.sh -b -t "$PREVIOUS_RELEASES_DIR" "${PREVIOUS_RELEASES_TO_DOWNLOAD}"
+ DOCKER_EXEC contrib/devtools/previous_release.py -b -t "$PREVIOUS_RELEASES_DIR" "${PREVIOUS_RELEASES_TO_DOWNLOAD}"
END_FOLD
fi
diff --git a/contrib/devtools/previous_release.sh b/contrib/devtools/previous_release.sh
deleted file mode 100755
index d375291f47..0000000000
--- a/contrib/devtools/previous_release.sh
+++ /dev/null
@@ -1,152 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2018-2020 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#
-# Build previous releases.
-
-export LC_ALL=C
-
-CONFIG_FLAGS=""
-FUNCTIONAL_TESTS=0
-DELETE_EXISTING=0
-USE_DEPENDS=0
-DOWNLOAD_BINARY=0
-CONFIG_FLAGS=""
-TARGET="releases"
-
-while getopts ":hfrdbt:" opt; do
- case $opt in
- h)
- echo "Usage: .previous_release.sh [options] tag1 tag2"
- echo " options:"
- echo " -h Print this message"
- echo " -f Configure for functional tests"
- echo " -r Remove existing directory"
- echo " -d Use depends"
- echo " -b Download release binary"
- echo " -t Target directory (default: releases)"
- exit 0
- ;;
- f)
- FUNCTIONAL_TESTS=1
- CONFIG_FLAGS="$CONFIG_FLAGS --without-gui --disable-tests --disable-bench"
- ;;
- r)
- DELETE_EXISTING=1
- ;;
- d)
- USE_DEPENDS=1
- ;;
- b)
- DOWNLOAD_BINARY=1
- ;;
- t)
- TARGET=$OPTARG
- ;;
- \?)
- echo "Invalid option: -$OPTARG" >&2
- exit 1
- ;;
- esac
-done
-
-shift $((OPTIND-1))
-
-if [ -z "$1" ]; then
- echo "Specify release tag(s), e.g.: .previous_release v0.15.1"
- exit 1
-fi
-
-if [ ! -d "$TARGET" ]; then
- mkdir -p $TARGET
-fi
-
-if [ "$DOWNLOAD_BINARY" -eq "1" ]; then
- HOST="${HOST:-$(./depends/config.guess)}"
- case "$HOST" in
- x86_64-*-linux*)
- PLATFORM=x86_64-linux-gnu
- ;;
- x86_64-apple-darwin*)
- PLATFORM=osx64
- ;;
- *)
- echo "Not sure which binary to download for $HOST."
- exit 1
- ;;
- esac
-fi
-
-echo "Releases directory: $TARGET"
-pushd "$TARGET" || exit 1
-{
- for tag in "$@"
- do
- if [ "$DELETE_EXISTING" -eq "1" ]; then
- if [ -d "$tag" ]; then
- rm -r "$tag"
- fi
- fi
-
- if [ "$DOWNLOAD_BINARY" -eq "0" ]; then
-
- if [ ! -d "$tag" ]; then
- if [ -z $(git tag -l "$tag") ]; then
- echo "Tag $tag not found"
- exit 1
- fi
-
- git clone https://github.com/bitcoin/bitcoin "$tag"
- pushd "$tag" || exit 1
- {
- git checkout "$tag"
- if [ "$USE_DEPENDS" -eq "1" ]; then
- pushd depends || exit 1
- {
- if [ "$FUNCTIONAL_TESTS" -eq "1" ]; then
- make NO_QT=1
- else
- make
- fi
- HOST="${HOST:-$(./config.guess)}"
- }
- popd || exit 1
- CONFIG_FLAGS="--prefix=$PWD/depends/$HOST $CONFIG_FLAGS"
- fi
- ./autogen.sh
- ./configure $CONFIG_FLAGS
- make
- # Move binaries, so they're in the same place as in the release download:
- mkdir bin
- mv src/bitcoind src/bitcoin-cli src/bitcoin-tx bin
- if [ "$FUNCTIONAL_TESTS" -eq "0" ]; then
- mv src/qt/bitcoin-qt bin
- fi
- }
- popd || exit 1
- fi
- else
- if [ -d "$tag" ]; then
- echo "Using cached $tag"
- else
- mkdir "$tag"
- if [[ "$tag" =~ v(.*)(rc[0-9]+)$ ]]; then
- BIN_PATH="bin/bitcoin-core-${BASH_REMATCH[1]}/test.${BASH_REMATCH[2]}"
- else
- BIN_PATH="bin/bitcoin-core-${tag:1}"
- fi
- URL="https://bitcoincore.org/$BIN_PATH/bitcoin-${tag:1}-$PLATFORM.tar.gz"
- echo "Fetching: $URL"
- if ! curl -O -f $URL; then
- echo "Download failed."
- exit 1
- fi
- tar -zxf "bitcoin-${tag:1}-$PLATFORM.tar.gz" -C "$tag" --strip-components=1 "bitcoin-${tag:1}"
- rm "bitcoin-${tag:1}-$PLATFORM.tar.gz"
- fi
- fi
- done
-}
-popd || exit 1
diff --git a/test/functional/feature_backwards_compatibility.py b/test/functional/feature_backwards_compatibility.py
index 5cddd6527e..07dd0f8f82 100755
--- a/test/functional/feature_backwards_compatibility.py
+++ b/test/functional/feature_backwards_compatibility.py
@@ -6,7 +6,7 @@
Test various backwards compatibility scenarios. Download the previous node binaries:
-contrib/devtools/previous_release.sh -b v0.19.1 v0.18.1 v0.17.1 v0.16.3 v0.15.2
+contrib/devtools/previous_release.py -b v0.19.1 v0.18.1 v0.17.1 v0.16.3 v0.15.2
v0.15.2 is not required by this test, but it is used in wallet_upgradewallet.py.
Due to a hardfork in regtest, it can't be used to sync nodes.
diff --git a/test/functional/mempool_compatibility.py b/test/functional/mempool_compatibility.py
index 999399dec0..31fb751904 100755
--- a/test/functional/mempool_compatibility.py
+++ b/test/functional/mempool_compatibility.py
@@ -8,7 +8,7 @@ NOTE: The test is designed to prevent cases when compatibility is broken acciden
In case we need to break mempool compatibility we can continue to use the test by just bumping the version number.
Download node binaries:
-contrib/devtools/previous_release.sh -b v0.19.1 v0.18.1 v0.17.1 v0.16.3 v0.15.2
+contrib/devtools/previous_release.py -b v0.19.1 v0.18.1 v0.17.1 v0.16.3 v0.15.2
Only v0.15.2 is required by this test. The rest is used in other backwards compatibility tests.
"""
diff --git a/test/functional/wallet_upgradewallet.py b/test/functional/wallet_upgradewallet.py
index cc2139a027..1a76f65215 100755
--- a/test/functional/wallet_upgradewallet.py
+++ b/test/functional/wallet_upgradewallet.py
@@ -6,7 +6,7 @@
Test upgradewallet RPC. Download node binaries:
-contrib/devtools/previous_release.sh -b v0.19.1 v0.18.1 v0.17.1 v0.16.3 v0.15.2
+contrib/devtools/previous_release.py -b v0.19.1 v0.18.1 v0.17.1 v0.16.3 v0.15.2
Only v0.15.2 and v0.16.3 are required by this test. The others are used in feature_backwards_compatibility.py
"""