mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
appveyor: use run_integration_tests.go
This commit is contained in:
parent
23845b071b
commit
d21b782119
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user