diff --git a/build.go b/build.go index 2f3f3e5f0..d81b57dc7 100644 --- a/build.go +++ b/build.go @@ -329,13 +329,17 @@ func main() { } verbosePrintf("create GOPATH at %v\n", gopath) - if err = updateGopath(gopath, filepath.Join(root, "src"), ""); err != nil { - die("copying files from %v to %v failed: %v\n", root, gopath, err) + if err = updateGopath(gopath, filepath.Join(root, "src", "restic"), "restic"); err != nil { + die("copying files from %v/src/restic to %v/src/restic failed: %v\n", root, gopath, err) + } + + if err = updateGopath(gopath, filepath.Join(root, "src", "cmds"), "cmds"); err != nil { + die("copying files from %v/src/cmds to %v/src/restic/cmds failed: %v\n", root, gopath, err) } vendor := filepath.Join(root, "vendor", "src") if err = updateGopath(gopath, vendor, ""); err != nil { - die("copying files from %v to %v failed: %v\n", root, gopath, err) + die("copying files from %v to %v/src failed: %v\n", vendor, gopath, err) } defer func() { @@ -372,7 +376,7 @@ func main() { args := []string{ "-tags", strings.Join(buildTags, " "), "-ldflags", ldflags, - "-o", output, "restic/cmd/restic", + "-o", output, "cmds/restic", } err = build(filepath.Join(gopath, "src"), gopath, args...) diff --git a/run_integration_tests.go b/run_integration_tests.go index e9ab7cda2..519a6cd1f 100644 --- a/run_integration_tests.go +++ b/run_integration_tests.go @@ -171,7 +171,7 @@ func (env *TravisEnvironment) RunTests() { "-arch", strings.Join(env.goxArch, " "), "-tags", tags, "-output", "/tmp/{{.Dir}}_{{.OS}}_{{.Arch}}", - "restic/cmd/restic") + "cmds/restic") } } @@ -192,7 +192,7 @@ func (env *TravisEnvironment) RunTests() { } // run the tests and gather coverage information - runWithEnv(envWithGOPATH, "gotestcover", "-coverprofile", "all.cov", "restic/...") + runWithEnv(envWithGOPATH, "gotestcover", "-coverprofile", "all.cov", "cmds/...", "restic/...") runGofmt()