mirror of https://github.com/grpc/grpc-go.git
documentation: add instructions for running tests locally (#2006)
This commit is contained in:
parent
b4a36ce6a6
commit
4172bfc25e
|
@ -27,6 +27,10 @@ How to get your contributions merged smoothly and quickly.
|
||||||
- Keep your PR up to date with upstream/master (if there are merge conflicts, we can't really merge your change).
|
- Keep your PR up to date with upstream/master (if there are merge conflicts, we can't really merge your change).
|
||||||
|
|
||||||
- **All tests need to be passing** before your change can be merged. We recommend you **run tests locally** before creating your PR to catch breakages early on.
|
- **All tests need to be passing** before your change can be merged. We recommend you **run tests locally** before creating your PR to catch breakages early on.
|
||||||
|
- `make all` to test everything, OR
|
||||||
|
- `make vet` to catch vet errors
|
||||||
|
- `make test` to run the tests
|
||||||
|
- `make testrace` to run tests in race mode
|
||||||
|
|
||||||
- Exceptions to the rules can be made if there's a compelling reason for doing so.
|
- Exceptions to the rules can be made if there's a compelling reason for doing so.
|
||||||
|
|
||||||
|
|
9
Makefile
9
Makefile
|
@ -1,4 +1,4 @@
|
||||||
all: test testrace
|
all: vet test testrace
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
go get -d -v google.golang.org/grpc/...
|
go get -d -v google.golang.org/grpc/...
|
||||||
|
@ -22,6 +22,9 @@ proto:
|
||||||
fi
|
fi
|
||||||
go generate google.golang.org/grpc/...
|
go generate google.golang.org/grpc/...
|
||||||
|
|
||||||
|
vet:
|
||||||
|
./vet.sh
|
||||||
|
|
||||||
test: testdeps
|
test: testdeps
|
||||||
go test -cpu 1,4 -timeout 5m google.golang.org/grpc/...
|
go test -cpu 1,4 -timeout 5m google.golang.org/grpc/...
|
||||||
|
|
||||||
|
@ -39,7 +42,7 @@ clean:
|
||||||
updatetestdeps \
|
updatetestdeps \
|
||||||
build \
|
build \
|
||||||
proto \
|
proto \
|
||||||
|
vet \
|
||||||
test \
|
test \
|
||||||
testrace \
|
testrace \
|
||||||
clean \
|
clean
|
||||||
coverage
|
|
||||||
|
|
Loading…
Reference in New Issue