Merge pull request #25685 from pwittrock/nodee2e

Automatic merge from submit-queue

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

We had an issue today where some node e2e tests were timing out in the pr builder.  We want to be able to skip tests in the pr builder and leave them running in the CI if this happens again.


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
pull/6/head
k8s-merge-robot 2016-05-29 05:42:51 -07:00
commit feee4834c8
5 changed files with 6 additions and 2 deletions

View File

@ -168,6 +168,7 @@ gather-resource-usage
gce-project
gce-service-account
gce-zone
ginkgo-flags
gke-cluster
go-header-file
google-json-key

View File

@ -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
@ -163,7 +164,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)

View File

@ -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"

View File

@ -8,3 +8,4 @@ GCE_ZONE=us-central1-f
GCE_PROJECT=kubernetes-jenkins
INSTALL_GODEP=true
CLEANUP=true
GINKGO_FLAGS=

View File

@ -8,3 +8,4 @@ GCE_ZONE=us-central1-f
GCE_PROJECT=kubernetes-jenkins-pull
INSTALL_GODEP=true
CLEANUP=true
GINKGO_FLAGS=