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
a672b501
Commit
a672b501
authored
Jan 04, 2017
by
deads2k
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add apiserver to list of unit tested packages
parent
e18f54f9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
test-integration.sh
hack/make-rules/test-integration.sh
+1
-1
test-kubeadm-cmd.sh
hack/make-rules/test-kubeadm-cmd.sh
+1
-1
test.sh
hack/make-rules/test.sh
+10
-6
No files found.
hack/make-rules/test-integration.sh
View file @
a672b501
...
@@ -42,7 +42,7 @@ kube::test::find_integration_test_dirs() {
...
@@ -42,7 +42,7 @@ kube::test::find_integration_test_dirs() {
(
(
cd
${
KUBE_ROOT
}
cd
${
KUBE_ROOT
}
find
test
/integration/
${
1
-
}
-name
'*_test.go'
-print0
\
find
test
/integration/
${
1
-
}
-name
'*_test.go'
-print0
\
| xargs
-0n1
dirname
\
| xargs
-0n1
dirname
|
sed
"s|^|
${
KUBE_GO_PACKAGE
}
/|"
\
|
LC_ALL
=
C
sort
-u
|
LC_ALL
=
C
sort
-u
)
)
}
}
...
...
hack/make-rules/test-kubeadm-cmd.sh
View file @
a672b501
...
@@ -28,5 +28,5 @@ KUBEADM_PATH="${KUBEADM_PATH:=$(kube::realpath "${KUBE_ROOT}")/cluster/kubeadm.s
...
@@ -28,5 +28,5 @@ KUBEADM_PATH="${KUBEADM_PATH:=$(kube::realpath "${KUBE_ROOT}")/cluster/kubeadm.s
make
-C
"
${
KUBE_ROOT
}
"
WHAT
=
cmd/kubeadm
make
-C
"
${
KUBE_ROOT
}
"
WHAT
=
cmd/kubeadm
make
-C
"
${
KUBE_ROOT
}
"
test
\
make
-C
"
${
KUBE_ROOT
}
"
test
\
WHAT
=
cmd/kubeadm/test
\
WHAT
=
k8s.io/kubernetes/
cmd/kubeadm/test
\
KUBE_TEST_ARGS
=
"--kubeadm-path '
${
KUBEADM_PATH
}
'"
KUBE_TEST_ARGS
=
"--kubeadm-path '
${
KUBEADM_PATH
}
'"
hack/make-rules/test.sh
View file @
a672b501
...
@@ -48,14 +48,18 @@ kube::test::find_dirs() {
...
@@ -48,14 +48,18 @@ kube::test::find_dirs() {
-o
-path
'./staging/*'
\
-o
-path
'./staging/*'
\
-o
-path
'./vendor/*'
\
-o
-path
'./vendor/*'
\
\)
-prune
\
\)
-prune
\
\)
-name
'*_test.go'
-print0
| xargs
-0n1
dirname
|
sed
's|^\./||'
|
LC_ALL
=
C
sort
-u
\)
-name
'*_test.go'
-print0
| xargs
-0n1
dirname
|
sed
"s|^
\.
/|
${
KUBE_GO_PACKAGE
}
/|"
|
LC_ALL
=
C
sort
-u
find
-L
.
\
find
-L
.
\
-path
'./_output'
-prune
\
-path
'./_output'
-prune
\
-o
-path
'./vendor/k8s.io/client-go/*'
\
-o
-path
'./vendor/k8s.io/client-go/*'
\
-o
-path
'./vendor/k8s.io/apiserver/*'
\
-o
-path
'./vendor/k8s.io/apiserver/*'
\
-o
-path
'./test/e2e_node/system/*'
\
-o
-path
'./test/e2e_node/system/*'
\
-name
'*_test.go'
-print0
| xargs
-0n1
dirname
|
sed
's|^\./||'
|
LC_ALL
=
C
sort
-u
-name
'*_test.go'
-print0
| xargs
-0n1
dirname
|
sed
"s|^
\.
/|
${
KUBE_GO_PACKAGE
}
/|"
|
LC_ALL
=
C
sort
-u
# run tests for apiserver
find ./staging/src/k8s.io/apiserver
-name
'*_test.go'
\
-name
'*_test.go'
-print0
| xargs
-0n1
dirname
|
sed
's|^\./staging/src/|./vendor/|'
|
LC_ALL
=
C
sort
-u
)
)
}
}
...
@@ -206,10 +210,10 @@ runTests() {
...
@@ -206,10 +210,10 @@ runTests() {
# the build artifacts but doesn't run the tests. The two together provide
# the build artifacts but doesn't run the tests. The two together provide
# a large speedup for tests that do not need to be rebuilt.
# a large speedup for tests that do not need to be rebuilt.
go
test
-i
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
\
go
test
-i
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
\
${
KUBE_RACE
}
${
KUBE_TIMEOUT
}
"
${
@
+
${
@/#/
${
KUBE_GO_PACKAGE
}
/
}
}
"
\
${
KUBE_RACE
}
${
KUBE_TIMEOUT
}
"
${
@
}
"
\
"
${
testargs
[@]
:+
${
testargs
[@]
}}
"
"
${
testargs
[@]
:+
${
testargs
[@]
}}
"
go
test
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
\
go
test
"
${
goflags
[@]
:+
${
goflags
[@]
}}
"
\
${
KUBE_RACE
}
${
KUBE_TIMEOUT
}
"
${
@
+
${
@/#/
${
KUBE_GO_PACKAGE
}
/
}
}
"
\
${
KUBE_RACE
}
${
KUBE_TIMEOUT
}
"
${
@
}
"
\
"
${
testargs
[@]
:+
${
testargs
[@]
}}
"
\
"
${
testargs
[@]
:+
${
testargs
[@]
}}
"
\
|
tee
${
junit_filename_prefix
:+
"
${
junit_filename_prefix
}
.stdout"
}
\
|
tee
${
junit_filename_prefix
:+
"
${
junit_filename_prefix
}
.stdout"
}
\
|
grep
"
${
go_test_grep_pattern
}
"
&&
rc
=
$?
||
rc
=
$?
|
grep
"
${
go_test_grep_pattern
}
"
&&
rc
=
$?
||
rc
=
$?
...
@@ -255,14 +259,14 @@ runTests() {
...
@@ -255,14 +259,14 @@ runTests() {
${
KUBE_TIMEOUT
}
\
${
KUBE_TIMEOUT
}
\
-cover -covermode=
\"
${
KUBE_COVERMODE
}
\"
\
-cover -covermode=
\"
${
KUBE_COVERMODE
}
\"
\
-coverprofile=
\"
${
cover_report_dir
}
/
\$
{_pkg}/
${
cover_profile
}
\"
\
-coverprofile=
\"
${
cover_report_dir
}
/
\$
{_pkg}/
${
cover_profile
}
\"
\
\"
${
KUBE_GO_PACKAGE
}
/
\$
{
_pkg}
\"
\
\"
${
_pkg
}
\"
\
${
testargs
[@]
:+
${
testargs
[@]
}}
${
testargs
[@]
:+
${
testargs
[@]
}}
go test
${
goflags
[@]
:+
${
goflags
[@]
}}
\
go test
${
goflags
[@]
:+
${
goflags
[@]
}}
\
${
KUBE_RACE
}
\
${
KUBE_RACE
}
\
${
KUBE_TIMEOUT
}
\
${
KUBE_TIMEOUT
}
\
-cover -covermode=
\"
${
KUBE_COVERMODE
}
\"
\
-cover -covermode=
\"
${
KUBE_COVERMODE
}
\"
\
-coverprofile=
\"
${
cover_report_dir
}
/
\$
{_pkg}/
${
cover_profile
}
\"
\
-coverprofile=
\"
${
cover_report_dir
}
/
\$
{_pkg}/
${
cover_profile
}
\"
\
\"
${
KUBE_GO_PACKAGE
}
/
\$
{
_pkg}
\"
\
\"
${
_pkg
}
\"
\
${
testargs
[@]
:+
${
testargs
[@]
}}
\
${
testargs
[@]
:+
${
testargs
[@]
}}
\
| tee
${
junit_filename_prefix
:+
\
"
${
junit_filename_prefix
}
-
\$
_pkg_out.stdout
\"
}
\
| tee
${
junit_filename_prefix
:+
\
"
${
junit_filename_prefix
}
-
\$
_pkg_out.stdout
\"
}
\
| grep
\"
${
go_test_grep_pattern
}
\"
"
\
| grep
\"
${
go_test_grep_pattern
}
\"
"
\
...
...
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