diff --git a/Makefile b/Makefile index 516db825bd..a614e3bea0 100644 --- a/Makefile +++ b/Makefile @@ -183,3 +183,10 @@ build-docs: @cd docs && ./build.sh .PHONY: build-docs + +############################################################################### +### Test Traces ### +############################################################################### + +e2e-traces: + cd tests/e2e; go test -timeout 30s -run ^TestWriteExamples -v \ No newline at end of file diff --git a/tests/e2e/README.md b/tests/e2e/README.md index ee9c962651..4fb3e721e8 100644 --- a/tests/e2e/README.md +++ b/tests/e2e/README.md @@ -10,4 +10,15 @@ If the chain state from `state.go` is modified, the `ChainStateWithProposalTypes When adding a new proposal type: * add a case for your proposal type to `json_utils.go/UnmarshalProposalWithType` -* add a generator for your proposal type in `state_rapid_test.go` and add it to the `GetProposalGen` function \ No newline at end of file +* add a generator for your proposal type in `state_rapid_test.go` and add it to the `GetProposalGen` function + +## Regenerating Traces + +The traces in `tracehandler_testdata` are generated by the test `trace_handlers_test.go/TestWriteExamples`. + +You can regenerate them by running `make e2e-traces` in the root of the repo. + +## Running against traces + +To run a test trace in the e2e tests, run `go run . --test-file $TRACEFILE::$TESTCONFIG`. +See `--help` for more details.