#!/bin/bash # Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. export KUBERNETES_PROVIDER="kubemark" export KUBE_CONFIG_FILE="config-default.sh" global KUBE_ROOT := "$[dirname $(BASH_SOURCE)]/../.." # We need an absolute path to KUBE_ROOT global ABSOLUTE_ROOT := $[readlink -f $(KUBE_ROOT)] source "$(KUBE_ROOT)/cluster/kubemark/util.sh" echo "Kubemark master name: $(MASTER_NAME)" detect-master export KUBE_MASTER_URL="https://$(KUBE_MASTER_IP)" export KUBECONFIG="$(ABSOLUTE_ROOT)/test/kubemark/resources/kubeconfig.kubemark" export E2E_MIN_STARTUP_PODS=0 if [[ -z "$@" ]] { global ARGS := ''--ginkgo.focus=[Feature:Performance]'' } else { global ARGS := $ifsjoin(Argv) } if [[ "${ENABLE_KUBEMARK_CLUSTER_AUTOSCALER}" == "true" ]] { global ARGS := ""$(ARGS) --kubemark-external-kubeconfig=$(DEFAULT_KUBECONFIG)"" } if [[ -f /.dockerenv ]] { # Running inside a dockerized runner. go run ./hack/e2e.go -- -v --check-version-skew=false --test --test_args="--e2e-verify-service-account=false --dump-logs-on-failure=false $(ARGS)" } else { # Running locally. global ARGS := $[echo $ARGS | sed 's/\[/\\\[/g' | sed 's/\]/\\\]/g] $(KUBE_ROOT)/hack/ginkgo-e2e.sh "--e2e-verify-service-account=false" "--dump-logs-on-failure=false" $ARGS } (CommandList children: [ (C {(export)} {(Lit_VarLike "KUBERNETES_PROVIDER=") (DQ (kubemark))}) (C {(export)} {(Lit_VarLike "KUBE_CONFIG_FILE=") (DQ (config-default.sh))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBE_ROOT) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {(DQ (${ VSub_Name BASH_SOURCE))})] ) left_token: spids: [60 68] ) (/../..) } spids: [59] ) ] spids: [59] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ABSOLUTE_ROOT) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(readlink)} {(-f)} {(${ VSub_Name KUBE_ROOT)})] ) left_token: spids: [76 84] ) } spids: [75] ) ] spids: [75] ) (C {(source)} {(DQ (${ VSub_Name KUBE_ROOT) (/cluster/kubemark/util.sh))}) (C {(echo)} {(DQ ("Kubemark master name: ") (${ VSub_Name MASTER_NAME))}) (C {(detect-master)}) (C {(export)} {(Lit_VarLike "KUBE_MASTER_URL=") (DQ ("https://") (${ VSub_Name KUBE_MASTER_IP))}) (C {(export)} {(Lit_VarLike "KUBECONFIG=") (DQ (${ VSub_Name ABSOLUTE_ROOT) (/test/kubemark/resources/kubeconfig.kubemark)) } ) (C {(export)} {(Lit_VarLike "E2E_MIN_STARTUP_PODS=") (0)}) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr:(BoolUnary op_id:BoolUnary_z child:{(DQ ($ VSub_At "$@"))})) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ARGS) op: Equal rhs: {(SQ <"--ginkgo.focus=[Feature:Performance]">)} spids: [152] ) ] spids: [152] ) ] spids: [-1 149] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ARGS) op:Equal rhs:{($ VSub_At "$@")} spids:[160])] spids: [160] ) ] spids: [157 163] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ (${ VSub_Name ENABLE_KUBEMARK_CLUSTER_AUTOSCALER))} right: {(DQ (true))} ) ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ARGS) op: Equal rhs: { (DQ (${ VSub_Name ARGS) (" --kubemark-external-kubeconfig=") (${ VSub_Name DEFAULT_KUBECONFIG) ) } spids: [188] ) ] spids: [188] ) ] spids: [-1 185] ) ] spids: [-1 199] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr:(BoolUnary op_id:BoolUnary_f child:{(/.dockerenv)})) terminator: ) ] action: [ (C {(go)} {(run)} {(./hack/e2e.go)} {(--)} {(-v)} {(--check-version-skew) (Lit_Other "=") (false)} {(--test)} {(--test_args) (Lit_Other "=") (DQ ("--e2e-verify-service-account=false --dump-logs-on-failure=false ") (${ VSub_Name ARGS) ) } ) ] spids: [-1 213] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ARGS) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name "$ARGS")}) (C {(sed)} {(SQ <"s/\\[/\\\\\\[/g">)}) (C {(sed)} {(SQ <"s/\\]/\\\\\\]/g">)}) ] negated: False ) ] ) left_token: spids: [253 273] ) } spids: [252] ) ] spids: [252] ) (C {(${ VSub_Name KUBE_ROOT) (/hack/ginkgo-e2e.sh)} {(DQ ("--e2e-verify-service-account=false"))} {(DQ ("--dump-logs-on-failure=false"))} {($ VSub_Name "$ARGS")} ) ] spids: [245 291] ) ] )