mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 02:18:44 -07:00
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
|
||||
}
|
||||
|
||||
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.Stderr = p.logfd
|
||||
cmd.Env = append(os.Environ(), env...)
|
||||
|
Loading…
Reference in New Issue
Block a user