Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support per-test-environment ginkgo flags for node e2e tests to facilitate skipping miss behaving tests in PR builder #25685

Merged
merged 1 commit into from
May 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions hack/verify-flags/known-flags.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ gather-resource-usage
gce-project
gce-service-account
gce-zone
ginkgo-flags
gke-cluster
go-header-file
google-json-key
Expand Down
3 changes: 2 additions & 1 deletion test/e2e_node/e2e_remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var sshOptions = flag.String("ssh-options", "", "Commandline options passed to s
var sshEnv = flag.String("ssh-env", "", "Use predefined ssh options for environment. Options: gce")
var testTimeoutSeconds = flag.Int("test-timeout", 45*60, "How long (in seconds) to wait for ginkgo tests to complete.")
var resultsDir = flag.String("results-dir", "/tmp/", "Directory to scp test results to.")
var ginkgoFlags = flag.String("ginkgo-flags", "", "Passed to ginkgo to specify additional flags such as --skip=.")

var sshOptionsMap map[string]string

Expand Down Expand Up @@ -160,7 +161,7 @@ func RunRemote(archive string, host string, cleanup bool, junitFileNumber int) (
cmd = getSshCommand(" && ",
fmt.Sprintf("cd %s", tmp),
fmt.Sprintf("tar -xzvf ./%s", archiveName),
fmt.Sprintf("timeout -k 30s %ds ./e2e_node.test --logtostderr --v 2 --build-services=false --stop-services=%t --node-name=%s --report-dir=%s/results --junit-file-number=%d", *testTimeoutSeconds, cleanup, host, tmp, junitFileNumber),
fmt.Sprintf("timeout -k 30s %ds ./e2e_node.test --logtostderr --v 2 --build-services=false --stop-services=%t --node-name=%s --report-dir=%s/results --junit-file-number=%d %s", *testTimeoutSeconds, cleanup, host, tmp, junitFileNumber, *ginkgoFlags),
)
glog.Infof("Starting tests on %s", host)
output, err := RunSshCommand("ssh", host, "--", "sh", "-c", cmd)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e_node/jenkins/e2e-node-jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ mkdir -p ${ARTIFACTS}
go run test/e2e_node/runner/run_e2e.go --logtostderr --vmodule=*=2 --ssh-env="gce" \
--zone="$GCE_ZONE" --project="$GCE_PROJECT" \
--hosts="$GCE_HOSTS" --images="$GCE_IMAGES" --cleanup="$CLEANUP" \
--results-dir="$ARTIFACTS"
--results-dir="$ARTIFACTS" --ginkgo-flags="$GINKGO_FLAGS"
1 change: 1 addition & 0 deletions test/e2e_node/jenkins/jenkins-ci.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ GCE_ZONE=us-central1-f
GCE_PROJECT=kubernetes-jenkins
INSTALL_GODEP=true
CLEANUP=true
GINKGO_FLAGS=
1 change: 1 addition & 0 deletions test/e2e_node/jenkins/jenkins-pull.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ GCE_ZONE=us-central1-f
GCE_PROJECT=kubernetes-jenkins-pull
INSTALL_GODEP=true
CLEANUP=true
GINKGO_FLAGS=