From fd31a107507bc5487db216243ffcd9dd4e33b409 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Fri, 11 Oct 2019 16:42:57 +0200 Subject: [PATCH 01/14] Add .gitlab-ci.yml --- .gitlab-ci.yml | 126 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000000..8a0a6b3bacf4 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,126 @@ +image: "ablock/dash-gitlabci-builder" + +variables: + DOCKER_DRIVER: overlay2 + +cache: + # Cache by branch/tag and job name + # Gitlab can't use caches from parent pipelines when doing the first build in a PR, so we use artifacts to copy + # caches into PRs + key: ${CI_COMMIT_REF_SLUG}-${CI_JOB_NAME}${CI_EXTERNAL_PULL_REQUEST_IID} + paths: + - $CI_PROJECT_DIR/cache + +stages: + - build + +.build_template: &build_template + stage: build + before_script: + - export BUILD_TARGET="$CI_JOB_NAME" + - echo BUILD_TARGET=$BUILD_TARGET + - source ./ci/matrix.sh + + # Install base packages (most should be installed already due to the builder image) + - apt-get update + - apt-get dist-upgrade -y + - apt-get install -y git g++ autotools-dev libtool m4 automake autoconf pkg-config zlib1g-dev libssl1.0-dev curl ccache bsdmainutils cmake + - apt-get install -y python3 python3-dev python3-pip + - apt-get install -y wget unzip + + # Setup some environment variables + - if [ "$CI_EXTERNAL_PULL_REQUEST_IID" != "" ]; then export PULL_REQUEST="true"; else export PULL_REQUEST="false"; fi + - export COMMIT_RANGE="$CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA" + - export JOB_NUMBER="$CI_JOB_ID" + - export HOST_SRC_DIR=$CI_PROJECT_DIR + - export CACHE_DIR=$CI_PROJECT_DIR/cache + - echo PULL_REQUEST=$PULL_REQUEST COMMIT_RANGE=$COMMIT_RANGE HOST_SRC_DIR=$HOST_SRC_DIR CACHE_DIR=$CACHE_DIR + - echo "Commit log:" && git log --format=fuller -1 + + # Init cache + - mkdir -p $CACHE_DIR + - > + if [ "$CI_COMMIT_REF_SLUG" != "develop" -a "$CI_COMMIT_TAG" == "" ]; then + if [ ! -d $CACHE_DIR/ccache ]; then + echo "Downloading cache from develop branch" + if wget -O cache-artifact.zip https://gitlab.com/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/-/jobs/artifacts/develop/download?job=$CI_JOB_NAME; then + unzip cache-artifact.zip + rm cache-artifact.zip + mv cache-artifact/* $CACHE_DIR/ + else + echo "Failed to download cache" + fi + else + echo "Not touching cache (was initialized from previous build)" + fi + else + echo "Not touching cache (building develop branch or tag)" + fi + # Create missing cache dirs + - mkdir -p $CACHE_DIR/ccache && mkdir -p $CACHE_DIR/depends && mkdir -p $CACHE_DIR/sdk-sources + # Keep this as it makes caching related debugging easier + - ls -lah $CACHE_DIR && ls -lah $CACHE_DIR/depends && ls -lah $CACHE_DIR/ccache + + # Build dash_hash + - git clone https://github.com/dashpay/dash_hash + - cd dash_hash && python3 setup.py install + + # Install build target specific packages (most should be installed already due to the builder image) + - echo PACKAGES=$PACKAGES + - if [ -n "$DPKG_ADD_ARCH" ]; then dpkg --add-architecture "$DPKG_ADD_ARCH" ; fi + - if [ -n "$PACKAGES" ]; then apt-get update && apt-get install -y --no-install-recommends --no-upgrade $PACKAGES; fi + + # Make mingw use correct threading libraries + - update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix || true + - update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix || true + - update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix || true + - update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix || true + + script: + - export BUILD_TARGET="$CI_JOB_NAME" + - cd $CI_PROJECT_DIR + - ./ci/build_depends.sh + - ./ci/build_src.sh + - ./ci/test_unittests.sh + - ./ci/test_integrationtests.sh + # Copy all cache files into cache-artifact so that they get uploaded. We only do this for develop so that artifacts + # stay minimal for PRs and branches (we never need them) + - > + mkdir $CI_PROJECT_DIR/cache-artifact + if [ "$CI_COMMIT_REF_SLUG" = "develop" ]; then + cp -ra $CACHE_DIR/* $CI_PROJECT_DIR/cache-artifact/ + fi + + # We're actually only interested in the develop branch creating the cache artifact, but there is no way to control this + # until https://gitlab.com/gitlab-org/gitlab-foss/issues/25478 gets implemented. Until then, we use an expiration time of + # 3 days and rely on daily builds to refresh the cache artifacts. We also keep non-develop artifacts at minimum size + artifacts: + name: cache-artifact + when: always + paths: + - $CI_PROJECT_DIR/cache-artifact + expire_in: 3 days + +arm-linux: + <<: *build_template + +win32: + <<: *build_template + +win64: + <<: *build_template + +linux32: + <<: *build_template + +linux64: + <<: *build_template + +linux64_nowallet: + <<: *build_template + +linux64_release: + <<: *build_template + +mac: + <<: *build_template From 5df4333f8ded95708d4e886639175ca963cdc7b7 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Sun, 13 Oct 2019 20:08:02 +0200 Subject: [PATCH 02/14] Use | instead of > for multiline commands This honor new-lines and makes ; unnecessary --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8a0a6b3bacf4..4568fc180227 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -39,7 +39,7 @@ stages: # Init cache - mkdir -p $CACHE_DIR - - > + - | if [ "$CI_COMMIT_REF_SLUG" != "develop" -a "$CI_COMMIT_TAG" == "" ]; then if [ ! -d $CACHE_DIR/ccache ]; then echo "Downloading cache from develop branch" @@ -85,7 +85,7 @@ stages: - ./ci/test_integrationtests.sh # Copy all cache files into cache-artifact so that they get uploaded. We only do this for develop so that artifacts # stay minimal for PRs and branches (we never need them) - - > + - | mkdir $CI_PROJECT_DIR/cache-artifact if [ "$CI_COMMIT_REF_SLUG" = "develop" ]; then cp -ra $CACHE_DIR/* $CI_PROJECT_DIR/cache-artifact/ From c2a397129422fbab0a850a883a6c20a953c88b23 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Sun, 13 Oct 2019 20:08:33 +0200 Subject: [PATCH 03/14] Use ubuntu:bionic as base image --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4568fc180227..351f1f5bf0b4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: "ablock/dash-gitlabci-builder" +image: "ubuntu:bionic" variables: DOCKER_DRIVER: overlay2 @@ -21,7 +21,7 @@ stages: - echo BUILD_TARGET=$BUILD_TARGET - source ./ci/matrix.sh - # Install base packages (most should be installed already due to the builder image) + # Install base packages - apt-get update - apt-get dist-upgrade -y - apt-get install -y git g++ autotools-dev libtool m4 automake autoconf pkg-config zlib1g-dev libssl1.0-dev curl ccache bsdmainutils cmake @@ -65,7 +65,7 @@ stages: - git clone https://github.com/dashpay/dash_hash - cd dash_hash && python3 setup.py install - # Install build target specific packages (most should be installed already due to the builder image) + # Install build target specific packages - echo PACKAGES=$PACKAGES - if [ -n "$DPKG_ADD_ARCH" ]; then dpkg --add-architecture "$DPKG_ADD_ARCH" ; fi - if [ -n "$PACKAGES" ]; then apt-get update && apt-get install -y --no-install-recommends --no-upgrade $PACKAGES; fi From 30dbbcb8ca6228c709d3ac3b926312f47950f280 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Sun, 13 Oct 2019 20:13:51 +0200 Subject: [PATCH 04/14] Move cache initialization before apt-get installs --- .gitlab-ci.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 351f1f5bf0b4..f4bca8b85de2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,23 +21,8 @@ stages: - echo BUILD_TARGET=$BUILD_TARGET - source ./ci/matrix.sh - # Install base packages - - apt-get update - - apt-get dist-upgrade -y - - apt-get install -y git g++ autotools-dev libtool m4 automake autoconf pkg-config zlib1g-dev libssl1.0-dev curl ccache bsdmainutils cmake - - apt-get install -y python3 python3-dev python3-pip - - apt-get install -y wget unzip - - # Setup some environment variables - - if [ "$CI_EXTERNAL_PULL_REQUEST_IID" != "" ]; then export PULL_REQUEST="true"; else export PULL_REQUEST="false"; fi - - export COMMIT_RANGE="$CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA" - - export JOB_NUMBER="$CI_JOB_ID" - - export HOST_SRC_DIR=$CI_PROJECT_DIR - - export CACHE_DIR=$CI_PROJECT_DIR/cache - - echo PULL_REQUEST=$PULL_REQUEST COMMIT_RANGE=$COMMIT_RANGE HOST_SRC_DIR=$HOST_SRC_DIR CACHE_DIR=$CACHE_DIR - - echo "Commit log:" && git log --format=fuller -1 - # Init cache + - export CACHE_DIR=$CI_PROJECT_DIR/cache - mkdir -p $CACHE_DIR - | if [ "$CI_COMMIT_REF_SLUG" != "develop" -a "$CI_COMMIT_TAG" == "" ]; then @@ -61,6 +46,21 @@ stages: # Keep this as it makes caching related debugging easier - ls -lah $CACHE_DIR && ls -lah $CACHE_DIR/depends && ls -lah $CACHE_DIR/ccache + # Install base packages + - apt-get update + - apt-get dist-upgrade -y + - apt-get install -y git g++ autotools-dev libtool m4 automake autoconf pkg-config zlib1g-dev libssl1.0-dev curl ccache bsdmainutils cmake + - apt-get install -y python3 python3-dev python3-pip + - apt-get install -y wget unzip + + # Setup some environment variables + - if [ "$CI_EXTERNAL_PULL_REQUEST_IID" != "" ]; then export PULL_REQUEST="true"; else export PULL_REQUEST="false"; fi + - export COMMIT_RANGE="$CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA" + - export JOB_NUMBER="$CI_JOB_ID" + - export HOST_SRC_DIR=$CI_PROJECT_DIR + - echo PULL_REQUEST=$PULL_REQUEST COMMIT_RANGE=$COMMIT_RANGE HOST_SRC_DIR=$HOST_SRC_DIR CACHE_DIR=$CACHE_DIR + - echo "Commit log:" && git log --format=fuller -1 + # Build dash_hash - git clone https://github.com/dashpay/dash_hash - cd dash_hash && python3 setup.py install From 81e46316e3dc584904b6367b4c5cc6cec875894e Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Sun, 13 Oct 2019 20:14:46 +0200 Subject: [PATCH 05/14] Cache apt packages --- .gitlab-ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f4bca8b85de2..38cd489a9389 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,9 +42,10 @@ stages: echo "Not touching cache (building develop branch or tag)" fi # Create missing cache dirs - - mkdir -p $CACHE_DIR/ccache && mkdir -p $CACHE_DIR/depends && mkdir -p $CACHE_DIR/sdk-sources + - mkdir -p $CACHE_DIR/ccache && mkdir -p $CACHE_DIR/depends && mkdir -p $CACHE_DIR/sdk-sources && mkdir -p $CACHE_DIR/apt # Keep this as it makes caching related debugging easier - - ls -lah $CACHE_DIR && ls -lah $CACHE_DIR/depends && ls -lah $CACHE_DIR/ccache + - ls -lah $CACHE_DIR && ls -lah $CACHE_DIR/depends && ls -lah $CACHE_DIR/ccache && ls -lah $CACHE_DIR/apt + - mv $CACHE_DIR/apt/* /var/cache/apt/archives/ || true # Install base packages - apt-get update @@ -70,6 +71,9 @@ stages: - if [ -n "$DPKG_ADD_ARCH" ]; then dpkg --add-architecture "$DPKG_ADD_ARCH" ; fi - if [ -n "$PACKAGES" ]; then apt-get update && apt-get install -y --no-install-recommends --no-upgrade $PACKAGES; fi + # Move apt packages into cache + - mv /var/cache/apt/archives/* $CACHE_DIR/apt/ || true + # Make mingw use correct threading libraries - update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix || true - update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix || true From 99faeb33d8b41398a4817eba140d9dd90cc4021b Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Sun, 13 Oct 2019 20:18:14 +0200 Subject: [PATCH 06/14] Move installation of wget and unzip up as we need it for the cache --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 38cd489a9389..a0e4985c293b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,9 @@ stages: - echo BUILD_TARGET=$BUILD_TARGET - source ./ci/matrix.sh + - apt-get update + - apt-get install -y wget unzip + # Init cache - export CACHE_DIR=$CI_PROJECT_DIR/cache - mkdir -p $CACHE_DIR @@ -48,11 +51,9 @@ stages: - mv $CACHE_DIR/apt/* /var/cache/apt/archives/ || true # Install base packages - - apt-get update - apt-get dist-upgrade -y - apt-get install -y git g++ autotools-dev libtool m4 automake autoconf pkg-config zlib1g-dev libssl1.0-dev curl ccache bsdmainutils cmake - apt-get install -y python3 python3-dev python3-pip - - apt-get install -y wget unzip # Setup some environment variables - if [ "$CI_EXTERNAL_PULL_REQUEST_IID" != "" ]; then export PULL_REQUEST="true"; else export PULL_REQUEST="false"; fi From 124047e452016d741e9576009bcbbde002b62a3b Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Sun, 13 Oct 2019 23:03:03 +0200 Subject: [PATCH 07/14] Prevent apt from deleting caches --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a0e4985c293b..ae5822074b95 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,8 @@ stages: - echo BUILD_TARGET=$BUILD_TARGET - source ./ci/matrix.sh + # The ubuntu base image has apt configured to delete caches after each invocation, which is something that is not desirable for us + - rm /etc/apt/apt.conf.d/docker-clean - apt-get update - apt-get install -y wget unzip From ad19766a05ae9c2a94ce1ab57ffb0a4f0da1d0b5 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Sun, 13 Oct 2019 23:50:51 +0200 Subject: [PATCH 08/14] Collect test logs into artifact --- .gitlab-ci.yml | 5 +++++ ci/matrix.sh | 1 - ci/test_integrationtests.sh | 28 +++++++++++++++++++++++++++- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ae5822074b95..3279ef268f56 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -57,6 +57,9 @@ stages: - apt-get install -y git g++ autotools-dev libtool m4 automake autoconf pkg-config zlib1g-dev libssl1.0-dev curl ccache bsdmainutils cmake - apt-get install -y python3 python3-dev python3-pip + # jinja2 is needed for combine_logs.py + - pip3 install jinja2 + # Setup some environment variables - if [ "$CI_EXTERNAL_PULL_REQUEST_IID" != "" ]; then export PULL_REQUEST="true"; else export PULL_REQUEST="false"; fi - export COMMIT_RANGE="$CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA" @@ -94,6 +97,7 @@ stages: # stay minimal for PRs and branches (we never need them) - | mkdir $CI_PROJECT_DIR/cache-artifact + mkdir -p $CI_PROJECT_DIR/testlogs if [ "$CI_COMMIT_REF_SLUG" = "develop" ]; then cp -ra $CACHE_DIR/* $CI_PROJECT_DIR/cache-artifact/ fi @@ -106,6 +110,7 @@ stages: when: always paths: - $CI_PROJECT_DIR/cache-artifact + - $CI_PROJECT_DIR/testlogs expire_in: 3 days arm-linux: diff --git a/ci/matrix.sh b/ci/matrix.sh index 216482c023cc..870c403877ee 100755 --- a/ci/matrix.sh +++ b/ci/matrix.sh @@ -27,7 +27,6 @@ export DOCKER_RUN_IN_BUILDER="docker run -t --rm -w $SRC_DIR $DOCKER_RUN_ARGS $B # Default values for targets export GOAL="install" export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks} -export PYTHON_DEBUG=1 export MAKEJOBS="-j4" export RUN_UNITTESTS=false diff --git a/ci/test_integrationtests.sh b/ci/test_integrationtests.sh index 456a6d2aa114..ceff7967bf3d 100755 --- a/ci/test_integrationtests.sh +++ b/ci/test_integrationtests.sh @@ -17,4 +17,30 @@ export LD_LIBRARY_PATH=$BUILD_DIR/depends/$HOST/lib cd build-ci/dashcore-$BUILD_TARGET -./test/functional/test_runner.py --coverage --quiet $PASS_ARGS +set +e +./test/functional/test_runner.py --coverage --quiet --nocleanup --tmpdir=$(pwd)/testdatadirs $PASS_ARGS +RESULT=$? +set -e + +echo "Collecting logs..." +BASEDIR=$(ls testdatadirs) +if [ "$BASEDIR" != "" ]; then + mkdir testlogs + for d in $(ls testdatadirs/$BASEDIR | grep -v '^cache$'); do + mkdir testlogs/$d + ./test/functional/combine_logs.py -c ./testdatadirs/$BASEDIR/$d > ./testlogs/$d/combined.log + ./test/functional/combine_logs.py --html ./testdatadirs/$BASEDIR/$d > ./testlogs/$d/combined.html + cd testdatadirs/$BASEDIR/$d + LOGFILES="$(find . -name 'debug.log' -or -name "test_framework.log")" + cd ../../.. + for f in $LOGFILES; do + d2="testlogs/$d/$(dirname $f)" + mkdir -p $d2 + cp testdatadirs/$BASEDIR/$d/$f $d2/ + done + done +fi + +mv testlogs ../../ + +exit $RESULT From 8cefdaf5ded171d9338542a15ac0f0af6689c023 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Sun, 13 Oct 2019 23:51:10 +0200 Subject: [PATCH 09/14] Make combine_logs.py always look for the template in the correct dir --- test/functional/combine_logs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/combine_logs.py b/test/functional/combine_logs.py index 3ca74ea35eac..ec70e2b4e8ce 100755 --- a/test/functional/combine_logs.py +++ b/test/functional/combine_logs.py @@ -106,7 +106,7 @@ def print_logs(log_events, color=False, html=False): except ImportError: print("jinja2 not found. Try `pip install jinja2`") sys.exit(1) - print(jinja2.Environment(loader=jinja2.FileSystemLoader('./')) + print(jinja2.Environment(loader=jinja2.FileSystemLoader(os.path.dirname(os.path.abspath(__file__)))) .get_template('combined_log_template.html') .render(title="Combined Logs from testcase", log_events=[event._asdict() for event in log_events])) From c2cd2785abf7293070fc4875334a7eda0933c957 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Mon, 14 Oct 2019 07:47:47 +0200 Subject: [PATCH 10/14] Move final cache stuff into after_script --- .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3279ef268f56..91e02dce6442 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,11 +93,13 @@ stages: - ./ci/build_src.sh - ./ci/test_unittests.sh - ./ci/test_integrationtests.sh + + after_script: # Copy all cache files into cache-artifact so that they get uploaded. We only do this for develop so that artifacts # stay minimal for PRs and branches (we never need them) + - mkdir $CI_PROJECT_DIR/cache-artifact + - mkdir -p $CI_PROJECT_DIR/testlogs - | - mkdir $CI_PROJECT_DIR/cache-artifact - mkdir -p $CI_PROJECT_DIR/testlogs if [ "$CI_COMMIT_REF_SLUG" = "develop" ]; then cp -ra $CACHE_DIR/* $CI_PROJECT_DIR/cache-artifact/ fi From b3a3d6bf37857b5ea67f79a0be2f55171c6cf0d8 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Mon, 14 Oct 2019 08:18:27 +0200 Subject: [PATCH 11/14] Reintroduce PYTHON_DEBUG=1, but only for .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index fd37ae9c95bf..5083fa990fc8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -125,6 +125,7 @@ install: - export HOST_SRC_DIR=$TRAVIS_BUILD_DIR - export HOST_CACHE_DIR=$HOME/cache - export TRAVIS_COMMIT_LOG=`git log --format=fuller -1` + - export PYTHON_DEBUG=1 - source ./ci/matrix.sh - mkdir -p $HOST_CACHE_DIR/docker && mkdir -p $HOST_CACHE_DIR/ccache && mkdir -p $HOST_CACHE_DIR/depends && mkdir -p $HOST_CACHE_DIR/sdk-sources # Keep this as it makes caching related debugging easier From ee1d097f8c2be1ba9f25af261d8c3a9f62e6af71 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Mon, 14 Oct 2019 10:15:01 +0200 Subject: [PATCH 12/14] Install jinja2 in Travis builder image --- ci/Dockerfile.builder | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/Dockerfile.builder b/ci/Dockerfile.builder index dd128b475d21..357ef0199237 100644 --- a/ci/Dockerfile.builder +++ b/ci/Dockerfile.builder @@ -14,6 +14,7 @@ RUN apt-get update && apt-get install -y python3-pip # Python stuff RUN pip3 install pyzmq # really needed? +RUN pip3 install jinja2 # dash_hash RUN git clone https://github.com/dashpay/dash_hash From e5ebabeddd9563899d2f64bcdaf15d639c799bb8 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Mon, 14 Oct 2019 12:18:19 +0200 Subject: [PATCH 13/14] Enable ChainLocks after quorums have been created Creating 4 quorums causes a lot of blocks to be created and signed by ChainLocks, which then causes timeouts later. --- test/functional/llmq-chainlocks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/functional/llmq-chainlocks.py b/test/functional/llmq-chainlocks.py index 423aab565a71..ae0e1811d59f 100755 --- a/test/functional/llmq-chainlocks.py +++ b/test/functional/llmq-chainlocks.py @@ -29,13 +29,14 @@ def run_test(self): sync_blocks(self.nodes, timeout=60*5) self.nodes[0].spork("SPORK_17_QUORUM_DKG_ENABLED", 0) - self.nodes[0].spork("SPORK_19_CHAINLOCKS_ENABLED", 0) self.wait_for_sporks_same() self.log.info("Mining 4 quorums") for i in range(4): self.mine_quorum() + self.nodes[0].spork("SPORK_19_CHAINLOCKS_ENABLED", 0) + self.log.info("Mine single block, wait for chainlock") self.nodes[0].generate(1) self.wait_for_chainlocked_block_all_nodes(self.nodes[0].getbestblockhash()) From 98554ea47573732b1a94da189e4b0e91d56b9785 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Mon, 14 Oct 2019 16:04:33 +0200 Subject: [PATCH 14/14] Increase timeout in wallet-dump.py test The first dumpwallet is quite slow sometimes, which then makes the later called dumpwallet throw a wallet locked exception. --- test/functional/wallet-dump.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/wallet-dump.py b/test/functional/wallet-dump.py index cc0d8649fb68..40bdbd2784d6 100755 --- a/test/functional/wallet-dump.py +++ b/test/functional/wallet-dump.py @@ -100,7 +100,7 @@ def run_test (self): #encrypt wallet, restart, unlock and dump self.nodes[0].node_encrypt_wallet('test') self.start_node(0) - self.nodes[0].walletpassphrase('test', 10) + self.nodes[0].walletpassphrase('test', 30) # Should be a no-op: self.nodes[0].keypoolrefill() self.nodes[0].dumpwallet(tmpdir + "/node0/wallet.encrypted.dump")