mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
Add support for make verify WHAT=typecheck
.
This will be used to make the typecheck job emit junit and avoids duplicating the rest of the verify logic.
This commit is contained in:
parent
f6e23e32f9
commit
d295ca1134
@ -112,10 +112,12 @@ define VERIFY_HELP_INFO
|
||||
#
|
||||
# Args:
|
||||
# BRANCH: Branch to be passed to verify-godeps.sh script.
|
||||
# WHAT: List of checks to run
|
||||
#
|
||||
# Example:
|
||||
# make verify
|
||||
# make verify BRANCH=branch_x
|
||||
# make verify WHAT="bazel typecheck"
|
||||
endef
|
||||
.PHONY: verify
|
||||
ifeq ($(PRINT_HELP),y)
|
||||
|
@ -73,6 +73,17 @@ function is-quick {
|
||||
return 1
|
||||
}
|
||||
|
||||
function is-explicitly-chosen {
|
||||
local name="${1#verify-}"
|
||||
name="${name%.*}"
|
||||
for e in ${WHAT}; do
|
||||
if [[ $e == "$name" ]]; then
|
||||
return
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
function run-cmd {
|
||||
local filename="${2##*/verify-}"
|
||||
local testname="${filename%%.*}"
|
||||
@ -109,13 +120,19 @@ function run-checks {
|
||||
for t in $(ls ${pattern})
|
||||
do
|
||||
local check_name="$(basename "${t}")"
|
||||
if is-excluded "${t}" ; then
|
||||
echo "Skipping ${check_name}"
|
||||
continue
|
||||
fi
|
||||
if ${QUICK} && ! is-quick "${t}" ; then
|
||||
echo "Skipping ${check_name} in quick mode"
|
||||
continue
|
||||
if [[ ! -z ${WHAT:-} ]]; then
|
||||
if ! is-explicitly-chosen "${check_name}"; then
|
||||
continue
|
||||
fi
|
||||
else
|
||||
if is-excluded "${t}" ; then
|
||||
echo "Skipping ${check_name}"
|
||||
continue
|
||||
fi
|
||||
if ${QUICK} && ! is-quick "${t}" ; then
|
||||
echo "Skipping ${check_name} in quick mode"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
echo -e "Verifying ${check_name}"
|
||||
local start=$(date +%s)
|
||||
|
Loading…
Reference in New Issue
Block a user