mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Allow per-environment ginkgo flags to be passed to the node e2e tests so that we can selectively disable slow tests in the PR builder when needed.
This commit is contained in:
parent
f24b7a7391
commit
1d91d24548
@ -165,6 +165,7 @@ gather-resource-usage
|
||||
gce-project
|
||||
gce-service-account
|
||||
gce-zone
|
||||
ginkgo-flags
|
||||
gke-cluster
|
||||
go-header-file
|
||||
google-json-key
|
||||
|
@ -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
|
||||
|
||||
@ -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)
|
||||
|
@ -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"
|
||||
|
@ -8,3 +8,4 @@ GCE_ZONE=us-central1-f
|
||||
GCE_PROJECT=kubernetes-jenkins
|
||||
INSTALL_GODEP=true
|
||||
CLEANUP=true
|
||||
GINKGO_FLAGS=
|
||||
|
@ -8,3 +8,4 @@ GCE_ZONE=us-central1-f
|
||||
GCE_PROJECT=kubernetes-jenkins-pull
|
||||
INSTALL_GODEP=true
|
||||
CLEANUP=true
|
||||
GINKGO_FLAGS=
|
||||
|
Loading…
Reference in New Issue
Block a user