Skip to content

Commit

Permalink
Make go_test_e2e() accept arbitrary tags. (knative#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrcunha authored and knative-prow-robot committed Nov 2, 2018
1 parent daf96ed commit e7569ae
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,14 @@ function fail_test() {
exit 1
}

# Run the given E2E tests (must be tagged as such).
# Run the given E2E tests. Assume tests are tagged e2e, unless `-tags=XXX` is passed.
# Parameters: $1..$n - any go test flags, then directories containing the tests to run.
function go_test_e2e() {
local options=""
(( EMIT_METRICS )) && options="-emitmetrics"
report_go_test -v -tags=e2e -count=1 $@ ${options}
local test_options=""
local go_options=""
(( EMIT_METRICS )) && test_options="-emitmetrics"
[[ ! " $@" == *" -tags="* ]] && go_options="-tags=e2e"
report_go_test -v -count=1 ${go_options} $@ ${test_options}
}

# Download the k8s binaries required by kubetest.
Expand Down

0 comments on commit e7569ae

Please sign in to comment.