Skip to content

Commit ebefec9

Browse files
authored
travis: fix GOARCH=386 and add misspell check (grpc#1658)
- Define env variable RUN386 and set GOARCH later, instead of assigning to GOARCH directly. Otherwise, gimme will override GOARCH back - Add misspell check - Disable -race on 386
1 parent abd3e10 commit ebefec9

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ go:
99
matrix:
1010
include:
1111
- go: 1.9.x
12-
env: GOARCH=386
12+
env: RUN386=1
1313

1414
go_import_path: google.golang.org/grpc
1515

1616
before_install:
1717
- if [[ "$TRAVIS_GO_VERSION" = 1.9* && "$GOARCH" != "386" ]]; then ./vet.sh -install || exit 1; fi
1818

1919
script:
20+
- if [[ -n "$RUN386" ]]; then export GOARCH=386; fi
2021
- if [[ "$TRAVIS_GO_VERSION" = 1.9* && "$GOARCH" != "386" ]]; then ./vet.sh || exit 1; fi
21-
- make test testrace
22+
- make test || exit 1
23+
- if [[ "$GOARCH" != "386" ]]; then make testrace; fi

transport/control.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func (qb *quotaPool) add(v int) {
156156
func (qb *quotaPool) lockedAdd(v int) {
157157
var wakeUp bool
158158
if qb.quota <= 0 {
159-
wakeUp = true // Wake up potential watiers.
159+
wakeUp = true // Wake up potential waiters.
160160
}
161161
qb.quota += v
162162
if wakeUp && qb.quota > 0 {

transport/http2_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) {
985985
t.Close()
986986
return
987987
}
988-
// A client can recieve multiple GoAways from the server (see
988+
// A client can receive multiple GoAways from the server (see
989989
// https://github.com/grpc/grpc-go/issues/1387). The idea is that the first
990990
// GoAway will be sent with an ID of MaxInt32 and the second GoAway will be
991991
// sent after an RTT delay with the ID of the last stream the server will

transport/transport_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ func TestMaxStreams(t *testing.T) {
11031103
}
11041104
}
11051105
}()
1106-
// Test these conditions untill they pass or
1106+
// Test these conditions until they pass or
11071107
// we reach the deadline (failure case).
11081108
for {
11091109
select {

vet.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ if [ "$1" = "-install" ]; then
2222
github.com/golang/lint/golint \
2323
golang.org/x/tools/cmd/goimports \
2424
honnef.co/go/tools/cmd/staticcheck \
25+
github.com/client9/misspell/cmd/misspell \
2526
github.com/golang/protobuf/protoc-gen-go \
2627
golang.org/x/tools/cmd/stringer
2728
if [[ "$check_proto" = "true" ]]; then
@@ -76,3 +77,4 @@ fi
7677

7778
# TODO(menghanl): fix errors in transport_test.
7879
staticcheck -ignore google.golang.org/grpc/transport/transport_test.go:SA2002 ./...
80+
misspell -error .

0 commit comments

Comments
 (0)