Commit d9bc7f08 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #52606 from Random-Liu/local-node-e2e-return-error

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Let local node e2e return error. Fixes #52665 Let `make test-e2e-node` return error when it fails. Now it always returns exit code 0, whenever it fails or not. @yguo0905 Could you help me review this? Signed-off-by: 's avatarLantao Liu <lantaol@google.com>
parents 2baaac65 55dc6f67
...@@ -57,16 +57,18 @@ func main() { ...@@ -57,16 +57,18 @@ func main() {
ginkgo := filepath.Join(outputDir, "ginkgo") ginkgo := filepath.Join(outputDir, "ginkgo")
test := filepath.Join(outputDir, "e2e_node.test") test := filepath.Join(outputDir, "e2e_node.test")
if *systemSpecName == "" { args := []string{*ginkgoFlags, test, "--", *testFlags}
runCommand(ginkgo, *ginkgoFlags, test, "--", *testFlags) if *systemSpecName != "" {
return 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 := runCommand(ginkgo, args...); err != nil {
if err != nil { glog.Exitf("Test failed: %v", err)
glog.Fatalf("Failed to get k8s root directory: %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 return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment