Fix integration tests

This commit is contained in:
Alexander Neumann 2017-07-21 22:02:50 +02:00
parent 9cd422791a
commit 898c5b6df5
1 changed files with 3 additions and 8 deletions

View File

@ -143,12 +143,7 @@ func (env *TravisEnvironment) RunTests() error {
_ = os.Setenv("RESTIC_TEST_FUSE", "0") _ = os.Setenv("RESTIC_TEST_FUSE", "0")
} }
cwd, err := os.Getwd() env.env["GOPATH"] = os.Getenv("GOPATH")
if err != nil {
return fmt.Errorf("Getwd() returned error: %v", err)
}
env.env["GOPATH"] = cwd + ":" + filepath.Join(cwd, "vendor")
// ensure that the following tests cannot be silently skipped on Travis // ensure that the following tests cannot be silently skipped on Travis
ensureTests := []string{ ensureTests := []string{
@ -187,7 +182,7 @@ func (env *TravisEnvironment) RunTests() error {
"-osarch", strings.Join(env.goxOSArch, " "), "-osarch", strings.Join(env.goxOSArch, " "),
"-tags", tags, "-tags", tags,
"-output", "/tmp/{{.Dir}}_{{.OS}}_{{.Arch}}", "-output", "/tmp/{{.Dir}}_{{.OS}}_{{.Arch}}",
"cmds/restic") "./cmd/restic")
if err != nil { if err != nil {
return err return err
} }
@ -200,7 +195,7 @@ func (env *TravisEnvironment) RunTests() error {
} }
// run the tests and gather coverage information // run the tests and gather coverage information
err = runWithEnv(env.env, "gotestcover", "-coverprofile", "all.cov", "cmds/...", "restic/...") err := runWithEnv(env.env, "gotestcover", "-coverprofile", "all.cov", "github.com/restic/restic/cmd/...", "github.com/restic/restic/internal/...")
if err != nil { if err != nil {
return err return err
} }