Skip to content

Commit

Permalink
Run race detection for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
buger committed Oct 9, 2014
1 parent 3a43e69 commit 5f883e0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
language: go
go: 1.3.3
script: sudo -E bash -c "source /etc/profile && gvm use go1.3.3 && export GOPATH=$HOME/gopath:$GOPATH && go get && go test -v"
script: sudo -E bash -c "source /etc/profile && gvm use go1.3.3 && export GOPATH=$HOME/gopath:$GOPATH && go get && GORACE='halt_on_error=1' go test -race -v"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dbuild:
docker build -t gor .

dtest:
docker run -v `pwd`:/gopath/src/gor -t -i gor go test -v
docker run -v `pwd`:/gopath/src/gor -t -i --env GORACE="halt_on_error=1" gor go test -race -v

drun:
docker run -v `pwd`:/gopath/src/gor -t -i gor go run $(SOURCE) --input-dummy=0 --output-dummy=0 --verbose
Expand Down
2 changes: 1 addition & 1 deletion output_dummy.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func NewDummyOutput(options string) (di *DummyOutput) {
}

func (i *DummyOutput) Write(data []byte) (int, error) {
fmt.Println("Writing message: ", data)
fmt.Println("Writing message: ", string(data))

return len(data), nil
}
Expand Down

0 comments on commit 5f883e0

Please sign in to comment.