Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
92562d5b
Unverified
Commit
92562d5b
authored
Apr 15, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Apr 15, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #76253 from YoubingLi/bugfix
Fixes # 76094 - Check the content of WHAT for Makefile's verify target
parents
ef8aa4fd
8a56ebed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
verify.sh
hack/make-rules/verify.sh
+21
-1
No files found.
hack/make-rules/verify.sh
View file @
92562d5b
...
@@ -82,6 +82,8 @@ QUICK_PATTERNS+=(
...
@@ -82,6 +82,8 @@ QUICK_PATTERNS+=(
EXCLUDED_CHECKS
=
$(
ls
${
EXCLUDED_PATTERNS
[@]/#/
${
KUBE_ROOT
}
\/hack\/
}
2>/dev/null
||
true
)
EXCLUDED_CHECKS
=
$(
ls
${
EXCLUDED_PATTERNS
[@]/#/
${
KUBE_ROOT
}
\/hack\/
}
2>/dev/null
||
true
)
QUICK_CHECKS
=
$(
ls
${
QUICK_PATTERNS
[@]/#/
${
KUBE_ROOT
}
\/hack\/
}
2>/dev/null
||
true
)
QUICK_CHECKS
=
$(
ls
${
QUICK_PATTERNS
[@]/#/
${
KUBE_ROOT
}
\/hack\/
}
2>/dev/null
||
true
)
TARGET_LIST
=()
IFS
=
" "
read
-r
-a
TARGET_LIST
<<<
"
${
WHAT
:-}
"
function
is-excluded
{
function
is-excluded
{
for
e
in
${
EXCLUDED_CHECKS
[@]
}
;
do
for
e
in
${
EXCLUDED_CHECKS
[@]
}
;
do
...
@@ -104,10 +106,13 @@ function is-quick {
...
@@ -104,10 +106,13 @@ function is-quick {
function
is-explicitly-chosen
{
function
is-explicitly-chosen
{
local
name
=
"
${
1
#verify-
}
"
local
name
=
"
${
1
#verify-
}
"
name
=
"
${
name
%.*
}
"
name
=
"
${
name
%.*
}
"
for
e
in
${
WHAT
}
;
do
index
=
0
for
e
in
"
${
TARGET_LIST
[@]
}
"
;
do
if
[[
"
${
e
}
"
==
"
${
name
}
"
]]
;
then
if
[[
"
${
e
}
"
==
"
${
name
}
"
]]
;
then
TARGET_LIST[
${
index
}
]=
""
return
return
fi
fi
index
=
$((
index
+
1
))
done
done
return
1
return
1
}
}
...
@@ -176,6 +181,20 @@ function run-checks {
...
@@ -176,6 +181,20 @@ function run-checks {
done
done
}
}
# Check invalid targets specified in "WHAT" and mark them as failure cases
function
missing-target-checks
{
# In case WHAT is not specified
[[
${#
TARGET_LIST
[@]
}
-eq
0
]]
&&
return
for
v
in
"
${
TARGET_LIST
[@]
}
"
do
[[
-z
"
${
v
}
"
]]
&&
continue
FAILED_TESTS+
=(
${
v
}
)
ret
=
1
done
}
SILENT
=
${
SILENT
:-
false
}
SILENT
=
${
SILENT
:-
false
}
QUICK
=
${
QUICK
:-
false
}
QUICK
=
${
QUICK
:-
false
}
...
@@ -190,6 +209,7 @@ fi
...
@@ -190,6 +209,7 @@ fi
ret
=
0
ret
=
0
run-checks
"
${
KUBE_ROOT
}
/hack/verify-*.sh"
bash
run-checks
"
${
KUBE_ROOT
}
/hack/verify-*.sh"
bash
run-checks
"
${
KUBE_ROOT
}
/hack/verify-*.py"
python
run-checks
"
${
KUBE_ROOT
}
/hack/verify-*.py"
python
missing-target-checks
if
[[
${
ret
}
-eq
1
]]
;
then
if
[[
${
ret
}
-eq
1
]]
;
then
print-failed-tests
print-failed-tests
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment