Conversation
test/p2p/client.sh
Outdated
| # run the test container on the local network | ||
| docker run -t --rm \ | ||
| -v "$GOPATH/src/github.com/tendermint/tendermint/test/p2p/:/go/src/github.com/tendermint/tendermint/test/p2p" \ | ||
| -v "$GOPATH/src/github.com/tendermint/tendermint/test/p2p/:/go/src/github.com/tendermint/tendermint/test/p2p":Z \ |
There was a problem hiding this comment.
NOTE: :Z is needed for SELinux to allow writes to the mounted volume on host
test/test_cover.sh
Outdated
|
|
||
| if [ $1 == "slow" ]; then | ||
| for pkg in ${PKGS[@]}; do | ||
| echo $pkg |
There was a problem hiding this comment.
not sure what determiend these distinctions. types runs way slower on my machine than node or rpc/client.
Is this really helpful ? Why not just run them all together as make test ...
There was a problem hiding this comment.
i split them up because of non-deterministic failures in the "slow" tests. Sure, another package might be slower or faster; these three "slow" packages just really mean "takes relatively long to run and has been known to reliably fail non-deterministically
There was a problem hiding this comment.
it's much easier to debug failures when they're in different jobs. The "slow" tests also generally pump out tons of logs. IMO the goal should be to, yeah, move the slow tests into the fast section, once they're sped up and more deterministic.
There was a problem hiding this comment.
great thanks for explanation!
test/persist/test_failure_indices.sh
Outdated
| $DUMMY_CMD &> "dummy_${name}.log" & | ||
| fi | ||
| echo "Starting persistent dummy and tendermint: $name" | ||
| $DUMMY_CMD &> "dummy_${name}.log" & |
There was a problem hiding this comment.
will I be able to see this log on jenkins ? same for ones below
There was a problem hiding this comment.
yes, they'll be archived as aritfacts, e.g., here's the coverage.txt that can be copied by a job that sends it to codecov. https://ci.interblock.io/job/05.Test.Tendermint.FeatureBranches.Cover.Fast/
test/persist/test_failure_indices.sh
Outdated
| # tendermint should already have exited when it hits the fail index | ||
| # but kill -9 for good measure | ||
| kill_procs | ||
| # kill_procs |
There was a problem hiding this comment.
? we dont want to leave zombie processes
| @@ -62,16 +62,47 @@ draw_deps: | |||
| ######################################## | |||
| ### Testing | |||
There was a problem hiding this comment.
can we get a single makefile target to run all the tests so we can easily run the full suite locally? need to ensure its easy to see logs and debug when doing this so we can figure out issues ...
69e985e to
9a32495
Compare
Makefile
Outdated
| # requires 'tester' the image from above | ||
| bash test/p2p/test.sh tester | ||
|
|
||
| test_all: |
There was a problem hiding this comment.
I personally liked the old test_integrations target
Makefile
Outdated
| vagrant ssh -c 'make test_all' | ||
|
|
||
| ### go tests without docker | ||
| test_unit: |
There was a problem hiding this comment.
I feel like we should still keep test target. Maybe alias it to test_unit by default?
test: test_unit
There was a problem hiding this comment.
let's just keep test to conform with:
Line 15 in 381fe19
Makefile
Outdated
| BUILD_FLAGS = -ldflags "-X github.com/tendermint/tendermint/version.GitCommit=`git rev-parse --short HEAD`" | ||
|
|
||
| all: check build test install | ||
| all: check build install test_integrations |
There was a problem hiding this comment.
I think Jae wanted to run tests before install.
There was a problem hiding this comment.
the tests need the binary available on $PATH
|
Can we get this rebased on develop and squash the commits please |
|
Let's get this passing on circle so we can merge @zramsay |
|
|
Can we get this rebased and cleaned up? Maybe @xla can take a look too? Not really Jenkins relevant (though Jenkins uses some of these targets) but would be nice to get merged. Also the unit tests run much faster now so we dont need the fast/slow targets. ` |
|
the fast/slow is gone |
| docker run --name run_persistence -t tester bash test/persist/test_failure_indices.sh | ||
|
|
||
| # TODO undockerize | ||
| # bash test/persist/test_failure_indices.sh |
There was a problem hiding this comment.
one reason the tests are faster here
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.log" |
There was a problem hiding this comment.
I think we still need this log
There was a problem hiding this comment.
The docker log usually isn't very telling, what information would we lose?
There was a problem hiding this comment.
The docker log usually isn't very telling, what information would we lose?
huh? all docker containers are logging msgs to docker.log through syslog
There was a problem hiding this comment.
Yeh the eg. p2p integration tests spin up 4 containers and do a bunch of tests with them. The only way to see what's happening on those nodes is the docker.log (we don't pipe it out to circle stdout directly because its so verbose)
There was a problem hiding this comment.
Surely, but the majority of those lines are the output of our binaries which we captured with the test_integration.log.
There was a problem hiding this comment.
Cool, clarified now. Would be nice to have a better split of those logs for easier tracing when doing forensics.
|
so are we just missing the logs from that last comment? |
| BUILD_FLAGS = -ldflags "-X github.com/tendermint/tendermint/version.GitCommit=`git rev-parse --short=8 HEAD`" | ||
|
|
||
| all: check build test install | ||
| all: check build test_integrations install |
There was a problem hiding this comment.
do we really want to run test_integrations here?
There was a problem hiding this comment.
IIRC this was requested (somewhere, can't remember)
| docker run --name run_persistence -t tester bash test/persist/test_failure_indices.sh | ||
|
|
||
| # TODO undockerize | ||
| # bash test/persist/test_failure_indices.sh |
|
I'm not sure if this PR makes sense anymore, with the changes happened to Circle and @greg-szabo efforts. Was able to rebase latest develop and it builds: https://circleci.com/workflow-run/7da83251-b7d6-4284-a572-dd908256b753 |
|
This PR is worth keeping for some of the cleanup (deleting unused files etc.). If someone wants to rebase and merge thatd be great! |
* makefile cleanup * tests: split fast and slow go tests, closes #1055
Codecov Report
@@ Coverage Diff @@
## develop #1098 +/- ##
===========================================
- Coverage 60.58% 59.43% -1.15%
===========================================
Files 112 121 +9
Lines 10863 11040 +177
===========================================
- Hits 6581 6562 -19
- Misses 3644 3865 +221
+ Partials 638 613 -25
Continue to review full report at Codecov.
|
|
@ebuchman Done. We might wanna squash for a bit cleaner history. |
| # 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 get_deps_bin_size test test_race test_integrations test_release test100 vagrant_test fmt metalinter metalinter_all | ||
| .PHONY: check build build_race dist install check_tools get_tools update_tools get_vendor_deps draw_depsbuild_test_docker_image test_cover test_apps test_persistence test_p2p test test_race test_libs test_integrations test_release test100 vagrant_test fmt |
There was a problem hiding this comment.
"draw_depsbuild_test_docker_image" space is missing
What used to be
make test_integrationand a rabbit hole of bash scripts is now:where each test is called by a seperate Jenkins job.
Some optimizations remain but require feedback.