de-mystify tests & run them in parallel#1031
Conversation
Makefile
Outdated
| # run the go unit tests with coverage (in docker) | ||
| docker run --name run_test -t tester bash test/test_cover.sh | ||
|
|
||
| test_cover_ci: |
There was a problem hiding this comment.
the *_ci suffix is temporary and replaces some logic in the test.sh file. The won't be necessary when jenkins is setup
| @echo "--> Installing tools" | ||
| go get -u -v $(GOTOOLS) | ||
| @gometalinter.v2 --install | ||
| #@gometalinter.v2 --install |
There was a problem hiding this comment.
punt the linter until jenkins
circle.yml
Outdated
| test: | ||
| override: | ||
| - cd "$PROJECT_PATH" && set -o pipefail && make test_integrations 2>&1 | tee test_integrations.log: | ||
| - case ${CIRCLE_NODE_INDEX} in 0) cd "$PROJECT_PATH" && make build_docker_test_image && make test_cover_ci;; 1) cd "$PROJECT_PATH" && make build_docker_test_image && make test_apps_ci;; 2) cd "$PROJECT_PATH" && make build_docker_test_image && make test_persistence_ci;; 3) cd "$PROJECT_PATH" && make build_docker_test_image && make test_p2p;; esac: |
There was a problem hiding this comment.
ugly but works. build_docker... could be added as pre-run to the relevant make targets but that's gonna get re-worked with jenkins anyway
circle.yml
Outdated
| #- cd "$PROJECT_PATH" && mv test_integrations.log "${CIRCLE_ARTIFACTS}" | ||
| #- cd "$PROJECT_PATH" && bash <(curl -s https://codecov.io/bash) -f coverage.txt | ||
| #- cd "$PROJECT_PATH" && mv coverage.txt "${CIRCLE_ARTIFACTS}" | ||
| #- cd "$PROJECT_PATH" && cp test/logs/messages "${CIRCLE_ARTIFACTS}/docker_logs.txt" |
There was a problem hiding this comment.
not sure what/how to do with this with the parallelism
There was a problem hiding this comment.
this is ditching the coverage and the logs. We need to keep both ... I don't know how worth it it is to get this stuff done on Circle if we're only going to move to Jenkins ...
| bash test/net/setup.sh | ||
|
|
||
| # start the testnet | ||
| bash test/net/start.sh |
There was a problem hiding this comment.
all the mintnet stuff is deprecated. nothing useful in this dir
|
|
||
| # before starting tendermint, remove the rpc socket | ||
| rm $RPC_ADDR | ||
| rm -f $RPC_ADDR |
There was a problem hiding this comment.
throws a warning on first run
| echo "* branch $BRANCH; testing libs" | ||
| # checkout every github.com/tendermint dir and run its tests | ||
| bash test/test_libs.sh | ||
| fi |
There was a problem hiding this comment.
all moved into Makefile, to be consumed by Jenkins and users
test/test.sh
Outdated
| echo "* [$(date +"%T")] building docker image" | ||
| bash "$DIR/docker/build.sh" | ||
| fi | ||
| pwd |
There was a problem hiding this comment.
copied over from somewhere ... ?
test/test.sh
Outdated
| fi | ||
| #TODO | ||
| ## copy the coverage results out of docker container | ||
| #docker cp run_test:/go/src/github.com/tendermint/tendermint/coverage.txt . |
There was a problem hiding this comment.
also to be dealt with in circle.yml - or just do it right in jenkins once
| if [[ "$CIRCLECI" == true ]]; then | ||
| docker run --name run_test -e CIRCLECI=true -t tester bash test/run_test.sh | ||
| else | ||
| docker run --name run_test -t tester bash test/run_test.sh |
There was a problem hiding this comment.
moved and split to Makefile
| if [[ "$SKIP_BUILD" == "" ]]; then | ||
| echo | ||
| echo "* [$(date +"%T")] building docker image" | ||
| bash "$DIR/docker/build.sh" |
6d8b8b5 to
d55c12c
Compare
| vagrant ssh -c 'make test_integrations' | ||
|
|
||
| ### go tests without docker | ||
| test_unit: |
There was a problem hiding this comment.
test would imply all the tests
Makefile
Outdated
| ### coverage, app, persistence, and libs tests | ||
| test_cover: | ||
| # cleanup | ||
| bash ./test/test.sh |
There was a problem hiding this comment.
lets rename to ./test/cleanup.sh
07c218d to
46272a0
Compare
f299b78 to
086ee4f
Compare
3ba54fe to
3c78d75
Compare
|
merging to jenkins branch |
* unclog build * Bump version
reduces the reliance on bash scripts (see tendermint/coding#45) by putting various test pathways as
maketargets. This let's us use circle's parallelism feature to shorten test time and prepares for move to jenkins