Skip to content

Commit

Permalink
Problem: migration tests curl times out on CI
Browse files Browse the repository at this point in the history
Solution: provide option to skip tests with env variable
set in .travis.yml

Rel: ethereumproject#245
  • Loading branch information
whilei committed Jun 2, 2017
1 parent 767c1db commit 77ad55c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ script:
- sed -E 's/v([[:digit:]]+\.[[:digit:]]+)\.[[:digit:]]-([[:digit:]]+).+/v\1.\2/' version.txt > version-only.txt
- sed -E 's/v([[:digit:]]+\.[[:digit:]]+)\.[[:digit:]]-([[:digit:]]+).+/v\1.x/' version.txt > version-base.txt
- go build -ldflags "-X main.Version="`cat version-app.txt` ./cmd/geth
- bats cmd/geth
- env SKIP_MIGRATION_TESTS=true bats cmd/geth
- zip geth-classic-$TRAVIS_OS_NAME-$(cat version-app.txt).zip geth
- sed -E "s/APPVERSION/$(cat version-base.txt)/" bintray.tpl.json > bintray.json

Expand Down
10 changes: 10 additions & 0 deletions cmd/geth/migrate_datadir.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@

setup() {

# Optionally skip migration tests.
# These depend on curl download various geth versions, which sometimes times out
# in the CI env. If changes are made to or around migration-related code, this
# env variable should NOT be set. However, if these tests have run and passed
# consistently multiple times in the CI environment, it may be considered safe
# to skip them to avoid CI false negatives.
if [ "$SKIP_MIGRATION_TESTS" ]; then
skip "skipping 3.4 migration change tests for CI environment"
fi

# A temporary place to hold current test datadir.
DATA_DIR=`mktemp -d`

Expand Down

0 comments on commit 77ad55c

Please sign in to comment.