Auto-update dependencies (#1144)

Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
This commit is contained in:
Knative Prow Robot 2020-03-05 16:52:26 -08:00 committed by GitHub
parent acb0b0386b
commit fc857aa77f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 36 deletions

4
Gopkg.lock generated
View File

@ -1342,14 +1342,14 @@
[[projects]]
branch = "master"
digest = "1:5d6439b7856df77cf6df3597a4711e0b39f85cab9986b7784b2521a8b7bdbfbb"
digest = "1:dd8432987142e8a917e58bac0137c287f54399fa68b0760936d52dce04eb639b"
name = "knative.dev/test-infra"
packages = [
"scripts",
"tools/dep-collector",
]
pruneopts = "UT"
revision = "a8e82a4213f65ffcee2c08cdb05f7636e76c51b6"
revision = "0c681e1f1df96322a62976d05d0add50bd50632e"
[[projects]]
digest = "1:8730e0150dfb2b7e173890c8b9868e7a273082ef8e39f4940e3506a481cf895c"

View File

@ -70,11 +70,10 @@ integration tests).
Use the flags `--build-tests`, `--unit-tests` and `--integration-tests` to run a
specific set of tests.
To run specific programs as a test, use the `--run-test` flag, and provide the
To run a specific program as a test, use the `--run-test` flag, and provide the
program as the argument. If arguments are required for the program, pass
everything as a single quotes argument. For example,
`./presubmit-tests.sh --run-test "test/my/test data"`. This flag can be used
repeatedly, and each one will be ran in sequential order.
`./presubmit-tests.sh --run-test "test/my/test data"`.
The script will automatically skip all presubmit tests for PRs where all changed
files are exempt of tests (e.g., a PR changing only the `OWNERS` file).

View File

@ -327,13 +327,6 @@ function capture_output() {
return ${failed}
}
# Print failed step, which could be highlighted by spyglass.
# Parameters: $1...n - description of step that failed
function step_failed() {
local spyglass_token="Step failed:"
echo "${spyglass_token} $@"
}
# Create a temporary file with the given extension in a way that works on both Linux and macOS.
# Parameters: $1 - file name without extension (e.g. 'myfile_XXXX')
# $2 - file extension (e.g. 'xml')

View File

@ -93,19 +93,19 @@ function run_build_tests() {
local failed=0
# Run pre-build tests, if any
if function_exists pre_build_tests; then
pre_build_tests || { failed=1; step_failed "pre_build_tests"; }
pre_build_tests || failed=1
fi
# Don't run build tests if pre-build tests failed
if (( ! failed )); then
if function_exists build_tests; then
build_tests || { failed=1; step_failed "build_tests"; }
build_tests || failed=1
else
default_build_test_runner || { failed=1; step_failed "default_build_test_runner"; }
default_build_test_runner || failed=1
fi
fi
# Don't run post-build tests if pre/build tests failed
if (( ! failed )) && function_exists post_build_tests; then
post_build_tests || { failed=1; step_failed "post_build_tests"; }
post_build_tests || failed=1
fi
results_banner "Build" ${failed}
return ${failed}
@ -153,7 +153,7 @@ function markdown_build_tests() {
function default_build_test_runner() {
local failed=0
# Perform markdown build checks first
markdown_build_tests || { failed=1; step_failed "markdown_build_tests"; }
markdown_build_tests || failed=1
# For documentation PRs, just check the md files
(( IS_DOCUMENTATION_PR )) && return ${failed}
# Don't merge these two lines, or return code will always be 0.
@ -211,19 +211,19 @@ function run_unit_tests() {
local failed=0
# Run pre-unit tests, if any
if function_exists pre_unit_tests; then
pre_unit_tests || { failed=1; step_failed "pre_unit_tests"; }
pre_unit_tests || failed=1
fi
# Don't run unit tests if pre-unit tests failed
if (( ! failed )); then
if function_exists unit_tests; then
unit_tests || { failed=1; step_failed "unit_tests"; }
unit_tests || failed=1
else
default_unit_test_runner || { failed=1; step_failed "default_unit_test_runner"; }
default_unit_test_runner || failed=1
fi
fi
# Don't run post-unit tests if pre/unit tests failed
if (( ! failed )) && function_exists post_unit_tests; then
post_unit_tests || { failed=1; step_failed "post_unit_tests"; }
post_unit_tests || failed=1
fi
results_banner "Unit" ${failed}
return ${failed}
@ -247,19 +247,19 @@ function run_integration_tests() {
local failed=0
# Run pre-integration tests, if any
if function_exists pre_integration_tests; then
pre_integration_tests || { failed=1; step_failed "pre_integration_tests"; }
pre_integration_tests || failed=1
fi
# Don't run integration tests if pre-integration tests failed
if (( ! failed )); then
if function_exists integration_tests; then
integration_tests || { failed=1; step_failed "integration_tests"; }
integration_tests || failed=1
else
default_integration_test_runner || { failed=1; step_failed "default_integration_test_runner"; }
default_integration_test_runner || failed=1
fi
fi
# Don't run integration tests if pre/integration tests failed
if (( ! failed )) && function_exists post_integration_tests; then
post_integration_tests || { failed=1; step_failed "post_integration_tests"; }
post_integration_tests || failed=1
fi
results_banner "Integration" ${failed}
return ${failed}
@ -273,7 +273,6 @@ function default_integration_test_runner() {
echo "Running integration test ${e2e_test}"
if ! ${e2e_test} ${options}; then
failed=1
step_failed "${e2e_test} ${options}"
fi
done
return ${failed}
@ -326,7 +325,7 @@ function main() {
[[ -z $1 ]] && set -- "--all-tests"
local TESTS_TO_RUN=()
local TEST_TO_RUN=""
while [[ $# -ne 0 ]]; do
local parameter=$1
@ -342,7 +341,7 @@ function main() {
--run-test)
shift
[[ $# -ge 1 ]] || abort "missing executable after --run-test"
TESTS_TO_RUN+=("$1")
TEST_TO_RUN="$1"
;;
*) abort "error: unknown option ${parameter}" ;;
esac
@ -352,7 +351,7 @@ function main() {
readonly RUN_BUILD_TESTS
readonly RUN_UNIT_TESTS
readonly RUN_INTEGRATION_TESTS
readonly TESTS_TO_RUN
readonly TEST_TO_RUN
cd ${REPO_ROOT_DIR}
@ -360,7 +359,7 @@ function main() {
local failed=0
if [[ ${#TESTS_TO_RUN[@]} > 0 ]]; then
if [[ -n "${TEST_TO_RUN}" ]]; then
if (( RUN_BUILD_TESTS || RUN_UNIT_TESTS || RUN_INTEGRATION_TESTS )); then
abort "--run-test must be used alone"
fi
@ -369,19 +368,17 @@ function main() {
header "Documentation only PR, skipping running custom test"
exit 0
fi
for test_to_run in ${TESTS_TO_RUN[@]}; do
${test_to_run} || { failed=1; step_failed "${test_to_run}"; }
done
${TEST_TO_RUN} || failed=1
fi
run_build_tests || { failed=1; step_failed "run_build_tests"; }
run_build_tests || failed=1
# If PRESUBMIT_TEST_FAIL_FAST is set to true, don't run unit tests if build tests failed
if (( ! PRESUBMIT_TEST_FAIL_FAST )) || (( ! failed )); then
run_unit_tests || { failed=1; step_failed "run_unit_tests"; }
run_unit_tests || failed=1
fi
# If PRESUBMIT_TEST_FAIL_FAST is set to true, don't run integration tests if build/unit tests failed
if (( ! PRESUBMIT_TEST_FAIL_FAST )) || (( ! failed )); then
run_integration_tests || { failed=1; step_failed "run_integration_tests"; }
run_integration_tests || failed=1
fi
exit ${failed}