Let local node e2e return error.

Signed-off-by: Lantao Liu <lantaol@google.com>
pull/6/head
Lantao Liu 2017-09-17 04:02:16 +00:00
parent 1a44e26670
commit 55dc6f67d3
1 changed files with 10 additions and 8 deletions

View File

@ -57,16 +57,18 @@ func main() {
ginkgo := filepath.Join(outputDir, "ginkgo")
test := filepath.Join(outputDir, "e2e_node.test")
if *systemSpecName == "" {
runCommand(ginkgo, *ginkgoFlags, test, "--", *testFlags)
return
args := []string{*ginkgoFlags, test, "--", *testFlags}
if *systemSpecName != "" {
rootDir, err := builder.GetK8sRootDir()
if err != nil {
glog.Fatalf("Failed to get k8s root directory: %v", err)
}
systemSpecFile := filepath.Join(rootDir, systemSpecPath, *systemSpecName+".yaml")
args = append(args, fmt.Sprintf("--system-spec-name=%s --system-spec-file=%s", *systemSpecName, systemSpecFile))
}
rootDir, err := builder.GetK8sRootDir()
if err != nil {
glog.Fatalf("Failed to get k8s root directory: %v", err)
if err := runCommand(ginkgo, args...); err != nil {
glog.Exitf("Test failed: %v", err)
}
systemSpecFile := filepath.Join(rootDir, systemSpecPath, *systemSpecName+".yaml")
runCommand(ginkgo, *ginkgoFlags, test, "--", fmt.Sprintf("--system-spec-name=%s --system-spec-file=%s", *systemSpecName, systemSpecFile), *testFlags)
return
}