Skip to content

Commit

Permalink
Improve the travis configuration for goclone.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brady Catherman committed Dec 4, 2014
1 parent 6a4560f commit de0f1fe
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 9 deletions.
36 changes: 34 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
language: go
go: 1.1
matrix:
allow_failures:
- go: tip
fast_finish: true
include:
- go: 1.1
env: SRC=""
- go: 1.2
env: SRC="code.google.com/p/go.tools/cmd"
- go: 1.3
env: SRC="code.google.com/p/go.tools/cmd"
- go: tip
env: SRC="golang.org/x/tools/cmd"

before_script:
- test -z "$SRC" || go get "$SRC/cover"
- test -z "$SRC" || go install "$SRC/cover"
- test -z "$SRC" || go get "$SRC/vet"
- test -z "$SRC" || go install "$SRC/vet"
- test -z "$SRC" || go get github.com/mattn/goveralls
- test -z "$SRC" || go install github.com/mattn/goveralls
- test -z "$SRC" || sudo -E $(which go) install -a -race std

script:
- sudo -E $(which go) test -v
- test -z "$(gofmt -l . | tee /dev/stderr)"
- go vet .
- sudo -E $(which go) test -v
- test -z "$SRC" || sudo -E $(which go) test -covermode=count -coverprofile=/tmp/coverage.out
- test -z "$SRC" || sudo -E $(which go) test -v -race .

after_script:
- $HOME/gopath/bin/goveralls -coverprofile=/tmp/coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN

env:
global:
secure: meZV7KAwusRQFUrNlIJYTfkueUd/Tz1JrdLshLuXgI7GiuZfPEPrtxr+56Zz7dniTDoNNBTkLIIBjCmmX8ldy31XoxLeslo+DoBR1gljv59hYKmw4sWyekaueduidrAMLIjrgDWn3LdU2ZkkvZTrd8U2eahGN63XRxOolYdf9Fc=
1 change: 0 additions & 1 deletion feature_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,4 +480,3 @@ func TestFeatureNewPIDNameSpace(t *testing.T) {
func TestFeatureNewUTSNameSpace(t *testing.T) {
t.Skipf("Test not implemented.")
}

2 changes: 1 addition & 1 deletion goclone.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ func (c *Cmd) Wait() (err error) {
// If the process exited with a non zero status then return a special
// error type just like exec.Wait()
if err == nil && !c.ProcessState.Success() {
return &exec.ExitError{c.ProcessState}
return &exec.ExitError{ProcessState: c.ProcessState}
}

return err
Expand Down
10 changes: 5 additions & 5 deletions mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
)

var (
osOpenFile = os.OpenFile
osOpen = os.Open
osPipe = os.Pipe
syscallMmap = syscall.Mmap
osOpenFile = os.OpenFile
osOpen = os.Open
osPipe = os.Pipe
syscallMmap = syscall.Mmap
syscallMprotect = syscall.Mprotect
syscallMunmap = syscall.Munmap
syscallMunmap = syscall.Munmap
)

0 comments on commit de0f1fe

Please sign in to comment.