Browse Source

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

e2e: fix -tags cov builds
Anthony Romano 8 years ago
parent
commit
15d8ca7726
1 changed files with 5 additions and 2 deletions
  1. 5 2
      e2e/etcd_spawn_cov.go

+ 5 - 2
e2e/etcd_spawn_cov.go.go → 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:]...)
 }