Can run integration tests between different versions
This commit is contained in:
parent
d4d391b34f
commit
dbcac37d91
@ -57,7 +57,19 @@ func (p *syncthingProcess) start() error {
|
|||||||
p.logfd = logfd
|
p.logfd = logfd
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd := exec.Command("../bin/syncthing", p.argv...)
|
binary := "../bin/syncthing"
|
||||||
|
|
||||||
|
// We check to see if there's an instance specific binary we should run,
|
||||||
|
// for example if we are running integration tests between different
|
||||||
|
// versions. If there isn't, we just go with the default.
|
||||||
|
if _, err := os.Stat(binary + "-" + p.instance); err == nil {
|
||||||
|
binary = binary + "-" + p.instance
|
||||||
|
}
|
||||||
|
if _, err := os.Stat(binary + "-" + p.instance + ".exe"); err == nil {
|
||||||
|
binary = binary + "-" + p.instance + ".exe"
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd := exec.Command(binary, p.argv...)
|
||||||
cmd.Stdout = p.logfd
|
cmd.Stdout = p.logfd
|
||||||
cmd.Stderr = p.logfd
|
cmd.Stderr = p.logfd
|
||||||
cmd.Env = append(os.Environ(), env...)
|
cmd.Env = append(os.Environ(), env...)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user