From 898c5b6df5985dd6d7741b49f7c59545ba440702 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 21 Jul 2017 22:02:50 +0200 Subject: [PATCH] Fix integration tests --- run_integration_tests.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/run_integration_tests.go b/run_integration_tests.go index 9317c8de5..a4ae68dbd 100644 --- a/run_integration_tests.go +++ b/run_integration_tests.go @@ -143,12 +143,7 @@ func (env *TravisEnvironment) RunTests() error { _ = os.Setenv("RESTIC_TEST_FUSE", "0") } - cwd, err := os.Getwd() - if err != nil { - return fmt.Errorf("Getwd() returned error: %v", err) - } - - env.env["GOPATH"] = cwd + ":" + filepath.Join(cwd, "vendor") + env.env["GOPATH"] = os.Getenv("GOPATH") // ensure that the following tests cannot be silently skipped on Travis ensureTests := []string{ @@ -187,7 +182,7 @@ func (env *TravisEnvironment) RunTests() error { "-osarch", strings.Join(env.goxOSArch, " "), "-tags", tags, "-output", "/tmp/{{.Dir}}_{{.OS}}_{{.Arch}}", - "cmds/restic") + "./cmd/restic") if err != nil { return err } @@ -200,7 +195,7 @@ func (env *TravisEnvironment) RunTests() error { } // 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 { return err }