Add test option to run performance tests

Performance tests are now skipped by default, but run in CI.
This commit is contained in:
Hannes Hörl 2017-11-28 12:25:39 +00:00 committed by Gareth Smith
parent 8523ad31f8
commit 63de385c65
2 changed files with 11 additions and 4 deletions

View File

@ -28,7 +28,7 @@ jobs:
export PATH="${PATH}:${GOPATH}/bin"
go get github.com/onsi/ginkgo/ginkgo
"${GOPATH}/src/k8s.io/kubectl/pkg/framework/test/scripts/download-binaries.sh"
"${GOPATH}/src/k8s.io/kubectl/pkg/framework/test/scripts/run-tests.sh"
GINKGO_PERFORMANCE=1 "${GOPATH}/src/k8s.io/kubectl/pkg/framework/test/scripts/run-tests.sh"
- name: push-to-prod-branch
serial: true
plan:

View File

@ -4,11 +4,18 @@ set -eu
# Use DEBUG=1 ./scripts/run-tests.sh to get debug output
[[ -z "${DEBUG:-""}" ]] || set -x
ginkgo_args=''
[[ -z "${GINKGO_WATCH:-""}" ]] || ginkgo_args="${ginkgo_args} watch"
declare -a ginkgo_args
if [[ -n "${GINKGO_WATCH:-""}" ]] ; then
ginkgo_args=( "${ginkgo_args[@]}" "watch" )
fi
if [[ -z ${GINKGO_PERFORMANCE:-""} ]] ; then
ginkgo_args=( "${ginkgo_args[@]}" "-skipMeasurements" )
fi
test_framework_dir="$(cd "$(dirname "$0")/.." ; pwd)"
export KUBE_ASSETS_DIR="${test_framework_dir}/assets/bin"
ginkgo $ginkgo_args -r "${test_framework_dir}"
ginkgo "${ginkgo_args[@]}" -r "${test_framework_dir}"