From 2ec8572a8cf3133996dd577ad6a388cac5f48bac Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Thu, 23 Feb 2017 22:27:10 -0800 Subject: [PATCH] e2e: fix -tags cov builds Wasn't compiling. --- e2e/{etcd_spawn_cov.go.go => etcd_spawn_cov.go} | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) rename e2e/{etcd_spawn_cov.go.go => etcd_spawn_cov.go} (94%) diff --git a/e2e/etcd_spawn_cov.go.go b/e2e/etcd_spawn_cov.go similarity index 94% rename from e2e/etcd_spawn_cov.go.go rename to e2e/etcd_spawn_cov.go index d7b8f8c9880..6a9571f2862 100644 --- a/e2e/etcd_spawn_cov.go.go +++ b/e2e/etcd_spawn_cov.go @@ -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:]...) }