forked from TrueCloudLab/restic
Run fuse tests on Linux
This commit is contained in:
parent
4ffca0f4b4
commit
e7fc908ff1
2 changed files with 14 additions and 16 deletions
13
.travis.yml
13
.travis.yml
|
@ -3,16 +3,27 @@ sudo: false
|
||||||
|
|
||||||
go:
|
go:
|
||||||
- 1.6.3
|
- 1.6.3
|
||||||
- 1.7
|
- 1.7.1
|
||||||
|
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
- osx
|
- osx
|
||||||
|
|
||||||
|
env:
|
||||||
|
matrix:
|
||||||
|
RESTIC_TEST_FUSE=0
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
exclude:
|
exclude:
|
||||||
- os: osx
|
- os: osx
|
||||||
go: 1.6.3
|
go: 1.6.3
|
||||||
|
include:
|
||||||
|
- os: linux
|
||||||
|
go: 1.7.1
|
||||||
|
sudo: true
|
||||||
|
env:
|
||||||
|
RESTIC_TEST_FUSE=1
|
||||||
|
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
irc:
|
irc:
|
||||||
|
|
|
@ -165,19 +165,6 @@ func (env *TravisEnvironment) Prepare() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if runtime.GOOS == "darwin" {
|
|
||||||
// install the libraries necessary for fuse
|
|
||||||
for _, cmd := range [][]string{
|
|
||||||
{"brew", "update"},
|
|
||||||
{"brew", "tap", "caskroom/cask"},
|
|
||||||
{"brew", "cask", "install", "osxfuse"},
|
|
||||||
} {
|
|
||||||
if err := run(cmd[0], cmd[1:]...); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if *runCrossCompile && !(runtime.Version() < "go1.7") {
|
if *runCrossCompile && !(runtime.Version() < "go1.7") {
|
||||||
// only test cross compilation on linux with Travis
|
// only test cross compilation on linux with Travis
|
||||||
if err := run("go", "get", "github.com/mitchellh/gox"); err != nil {
|
if err := run("go", "get", "github.com/mitchellh/gox"); err != nil {
|
||||||
|
@ -314,8 +301,8 @@ func StartBackgroundCommand(env map[string]string, cmd string, args ...string) (
|
||||||
|
|
||||||
// RunTests starts the tests for Travis.
|
// RunTests starts the tests for Travis.
|
||||||
func (env *TravisEnvironment) RunTests() error {
|
func (env *TravisEnvironment) RunTests() error {
|
||||||
// run fuse tests on darwin
|
// do not run fuse tests on darwin
|
||||||
if runtime.GOOS != "darwin" {
|
if runtime.GOOS == "darwin" {
|
||||||
msg("skip fuse integration tests on %v\n", runtime.GOOS)
|
msg("skip fuse integration tests on %v\n", runtime.GOOS)
|
||||||
os.Setenv("RESTIC_TEST_FUSE", "0")
|
os.Setenv("RESTIC_TEST_FUSE", "0")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue