From 70e7454c218bccebb6c5e125e34288efd4d09626 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 27 Mar 2018 11:44:53 -0400 Subject: [PATCH 1/3] comment out test_libs because of gcc dep in tmlibs --- .circleci/config.yml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cb2577908..11ad5f33f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -130,18 +130,18 @@ jobs: paths: - "profiles/*" - test_libs: - <<: *defaults - steps: - - attach_workspace: - at: /tmp/workspace - - restore_cache: - key: v1-pkg-cache - - restore_cache: - key: v1-tree-{{ .Environment.CIRCLE_SHA1 }} - - run: - name: Run tests - command: bash test/test_libs.sh + #test_libs: + # <<: *defaults + # steps: + # - attach_workspace: + # at: /tmp/workspace + # - restore_cache: + # key: v1-pkg-cache + # - restore_cache: + # key: v1-tree-{{ .Environment.CIRCLE_SHA1 }} + # - run: + # name: Run tests + # command: bash test/test_libs.sh test_persistence: <<: *defaults @@ -205,14 +205,14 @@ workflows: - test_cover: requires: - setup_dependencies - - test_libs: - filters: - branches: - only: - - develop - - master - requires: - - setup_dependencies + #- test_libs: + #- filters: + #- branches: + #- only: + #- - develop + #- - master + #- requires: + #- - setup_dependencies - test_persistence: requires: - setup_abci From 5243e54641dc2437a6aac0f379d4f234948bcbf8 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 2 Apr 2018 11:23:18 +0200 Subject: [PATCH 2/3] [codecov] ignore docs, scripts and DOCKER dirs --- codecov.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/codecov.yml b/codecov.yml index 6db0f15d5..b190853de 100644 --- a/codecov.yml +++ b/codecov.yml @@ -16,3 +16,8 @@ comment: require_changes: no require_base: no require_head: yes + +ignore: + - "docs" + - "DOCKER" + - "scripts" From 9c757108ca8bc849a04c23e6800e53155863e933 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 2 Apr 2018 11:29:03 +0200 Subject: [PATCH 3/3] [test] remove test_libs Reasons: 1) all deps we're using should be passing tests (including external) 2) deps can require complicated setup for testing 3) the person responsible for releasing Tendermint should be cautious when updating a dep --- .circleci/config.yml | 21 --------------------- Makefile | 7 +------ scripts/dep_utils/checkout.sh | 35 ----------------------------------- test/README.md | 4 ---- test/test_libs.sh | 34 ---------------------------------- 5 files changed, 1 insertion(+), 100 deletions(-) delete mode 100644 scripts/dep_utils/checkout.sh delete mode 100644 test/test_libs.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 11ad5f33f..8dac95a8e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -130,19 +130,6 @@ jobs: paths: - "profiles/*" - #test_libs: - # <<: *defaults - # steps: - # - attach_workspace: - # at: /tmp/workspace - # - restore_cache: - # key: v1-pkg-cache - # - restore_cache: - # key: v1-tree-{{ .Environment.CIRCLE_SHA1 }} - # - run: - # name: Run tests - # command: bash test/test_libs.sh - test_persistence: <<: *defaults steps: @@ -205,14 +192,6 @@ workflows: - test_cover: requires: - setup_dependencies - #- test_libs: - #- filters: - #- branches: - #- only: - #- - develop - #- - master - #- requires: - #- - setup_dependencies - test_persistence: requires: - setup_abci diff --git a/Makefile b/Makefile index c19ce11a6..3e51c834e 100644 --- a/Makefile +++ b/Makefile @@ -119,11 +119,6 @@ test_integrations: make test_persistence make test_p2p -test_libs: - # checkout every github.com/tendermint dir and run its tests - # NOTE: on release-* or master branches only (set by Jenkins) - docker run --name run_libs -t tester bash test/test_libs.sh - test_release: @go test -tags release $(PACKAGES) @@ -186,4 +181,4 @@ metalinter_all: # To avoid unintended conflicts with file names, always add to .PHONY # unless there is a reason not to. # https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html -.PHONY: check build build_race dist install check_tools get_tools update_tools get_vendor_deps draw_deps test_cover test_apps test_persistence test_p2p test test_race test_libs test_integrations test_release test100 vagrant_test fmt +.PHONY: check build build_race dist install check_tools get_tools update_tools get_vendor_deps draw_deps test_cover test_apps test_persistence test_p2p test test_race test_integrations test_release test100 vagrant_test fmt diff --git a/scripts/dep_utils/checkout.sh b/scripts/dep_utils/checkout.sh deleted file mode 100644 index 1d35e97ab..000000000 --- a/scripts/dep_utils/checkout.sh +++ /dev/null @@ -1,35 +0,0 @@ -#! /bin/bash - -set -ex - -set +u -if [[ "$DEP" == "" ]]; then - DEP=$GOPATH/src/github.com/tendermint/tendermint/Gopkg.lock -fi -set -u - - -set -u - -function getVendoredVersion() { - grep -A100 "$LIB" "$DEP" | grep revision | head -n1 | grep -o '"[^"]\+"' | cut -d '"' -f 2 -} - - -# fetch and checkout vendored dep - -lib=$1 - -echo "----------------------------------" -echo "Getting $lib ..." -go get -t "github.com/tendermint/$lib/..." - -VENDORED=$(getVendoredVersion "$lib") -cd "$GOPATH/src/github.com/tendermint/$lib" || exit -MASTER=$(git rev-parse origin/master) - -if [[ "$VENDORED" != "$MASTER" ]]; then - echo "... VENDORED != MASTER ($VENDORED != $MASTER)" - echo "... Checking out commit $VENDORED" - git checkout "$VENDORED" &> /dev/null -fi diff --git a/test/README.md b/test/README.md index d9f09fef7..ee53905bf 100644 --- a/test/README.md +++ b/test/README.md @@ -19,7 +19,3 @@ and run the following tests in docker containers: - send a tx on each node and ensure the state root is updated on all of them - crash and restart nodes one at a time and ensure they can sync back up (via fastsync) - crash and restart all nodes at once and ensure they can sync back up - -If on a `release-x.x.x` branch, we also run - -- `go test` for all our dependency libs (test/test_libs.sh) diff --git a/test/test_libs.sh b/test/test_libs.sh deleted file mode 100644 index 893bf35dc..000000000 --- a/test/test_libs.sh +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/bash -set -ex - -export PATH="$GOBIN:$PATH" - -# Get the parent directory of where this script is. -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done -DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )" - -#################### -# libs we depend on -#################### - -# All libs should define `make test` and `make get_vendor_deps` -LIBS=(tmlibs go-wire go-crypto abci) -for lib in "${LIBS[@]}"; do - # checkout vendored version of lib - bash scripts/dep_utils/checkout.sh "$lib" - - echo "Testing $lib ..." - cd "$GOPATH/src/github.com/tendermint/$lib" - make get_tools - make get_vendor_deps - make test - if [[ "$?" != 0 ]]; then - echo "FAIL" - exit 1 - fi - cd "$DIR" -done - -echo "" -echo "PASS"