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
43a29995
Commit
43a29995
authored
Jul 27, 2017
by
dhilipkumars
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display list of failed tests to the user
parent
3a0d8f8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
verify.sh
hack/make-rules/verify.sh
+19
-0
No files found.
hack/make-rules/verify.sh
View file @
43a29995
...
@@ -46,6 +46,7 @@ QUICK_PATTERNS+=(
...
@@ -46,6 +46,7 @@ QUICK_PATTERNS+=(
"verify-test-owners.sh"
"verify-test-owners.sh"
)
)
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
)
...
@@ -75,6 +76,19 @@ function run-cmd {
...
@@ -75,6 +76,19 @@ function run-cmd {
fi
fi
}
}
# Collect Failed tests in this Array , initalize it to nil
FAILED_TESTS
=()
function
print-failed-tests
{
echo
-e
"========================"
echo
-e
"
${
color_red
}
FAILED TESTS
${
color_norm
}
"
echo
-e
"========================"
for
t
in
${
FAILED_TESTS
[@]
}
;
do
echo
-e
"
${
color_red
}${
t
}${
color_norm
}
"
done
}
function
run-checks
{
function
run-checks
{
local
-r
pattern
=
$1
local
-r
pattern
=
$1
local
-r
runner
=
$2
local
-r
runner
=
$2
...
@@ -98,6 +112,7 @@ function run-checks {
...
@@ -98,6 +112,7 @@ function run-checks {
else
else
echo
-e
"
${
color_red
}
FAILED
${
color_norm
}
${
t
}
\t
${
elapsed
}
s"
echo
-e
"
${
color_red
}
FAILED
${
color_norm
}
${
t
}
\t
${
elapsed
}
s"
ret
=
1
ret
=
1
FAILED_TESTS+
=(
${
t
}
)
fi
fi
done
done
}
}
...
@@ -131,6 +146,10 @@ fi
...
@@ -131,6 +146,10 @@ 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
if
[[
${
ret
}
-eq
1
]]
;
then
print-failed-tests
fi
exit
${
ret
}
exit
${
ret
}
# ex: ts=2 sw=2 et filetype=sh
# ex: ts=2 sw=2 et filetype=sh
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