diff --git a/appveyor.yml b/appveyor.yml index 514b65061..77b8e5b4d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,11 +4,8 @@ environment: GOPATH: c:\gopath;c:\gopath\src\github.com\restic\restic\Godeps\_workspace install: - - echo %PATH% - - echo %GOPATH% - go version - go env build_script: - - go run build.go - - go test -v + - go run run_integration_tests.go diff --git a/run_integration_tests.go b/run_integration_tests.go index 43dab3fcd..7c4e05120 100644 --- a/run_integration_tests.go +++ b/run_integration_tests.go @@ -77,6 +77,19 @@ func (env *TravisEnvironment) RunTests() { runGofmt() } +type AppveyorEnvironment struct{} + +func (env *AppveyorEnvironment) Prepare() { + msg("preparing environment for Appveyor CI\n") + + // install tar, gzip, bzip2 +} + +func (env *AppveyorEnvironment) RunTests() { + // run the build script and the tests + run("go", "run", "build.go", "-v", "-T") +} + // findGoFiles returns a list of go source code file names below dir. func findGoFiles(dir string) (list []string, err error) { err = filepath.Walk(dir, func(name string, fi os.FileInfo, err error) error { @@ -153,12 +166,18 @@ func isTravis() bool { return os.Getenv("TRAVIS_BUILD_DIR") != "" } +func isAppveyor() bool { + return runtime.GOOS == "windows" +} + func main() { var env CIEnvironment switch { case isTravis(): env = &TravisEnvironment{} + case isAppveyor(): + env = &AppveyorEnvironment{} default: fmt.Fprintln(os.Stderr, "unknown CI environment") os.Exit(1)