Merge pull request #7375 from heyitsanthony/fix-e2e-cov

e2e: fix -tags cov builds
This commit is contained in:
Anthony Romano 2017-02-24 13:01:11 -08:00 committed by GitHub
commit 15d8ca7726

View File

@ -44,13 +44,16 @@ func spawnCmd(args []string) (*expect.ExpectProcess, error) {
fmt.Sprintf("-test.coverprofile=e2e.%v.coverprofile", time.Now().UnixNano()),
"-test.outputdir=" + coverPath,
}
ep := expect.NewExpectWithEnv(binDir+"/etcd_test", covArgs, args2env(args[1:]))
ep, err := expect.NewExpectWithEnv(binDir+"/etcd_test", covArgs, args2env(args[1:]))
if err != nil {
return nil, err
}
// ep sends SIGTERM to etcd_test process on ep.close()
// allowing the process to exit gracefully in order to generate a coverage report.
// note: go runtime ignores SIGINT but not SIGTERM
// if e2e test is run as a background process.
ep.StopSignal = syscall.SIGTERM
return nil, ep
return ep, nil
}
return expect.NewExpect(args[0], args[1:]...)
}