summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHemant Kumar <gnufied@users.noreply.github.com>2017-02-15 16:37:43 -0500
committerTim Hockin <thockin@google.com>2017-02-15 15:37:43 -0600
commitd897c14fab49937b3fcd189f109c557bf1fd7957 (patch)
tree95b083ada893f7b9b2f44821e605b015c6b25f93
parent7e763bf728d88fe0f82a4e7517024184f3ee47eb (diff)
make test with WHAT arguments changed (#296)
-rw-r--r--contributors/devel/testing.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/contributors/devel/testing.md b/contributors/devel/testing.md
index e67d81de..85bafe4b 100644
--- a/contributors/devel/testing.md
+++ b/contributors/devel/testing.md
@@ -69,19 +69,19 @@ You can set [go flags](https://golang.org/cmd/go/) by setting the
added automatically to these:
```sh
-make test WHAT=pkg/api # run tests for pkg/api
+make test WHAT=./pkg/api # run tests for pkg/api
```
To run multiple targets you need quotes:
```sh
-make test WHAT="pkg/api pkg/kubelet" # run tests for pkg/api and pkg/kubelet
+make test WHAT="./pkg/api ./pkg/kubelet" # run tests for pkg/api and pkg/kubelet
```
In a shell, it's often handy to use brace expansion:
```sh
-make test WHAT=pkg/{api,kubelet} # run tests for pkg/api and pkg/kubelet
+make test WHAT=./pkg/{api,kubelet} # run tests for pkg/api and pkg/kubelet
```
### Run specific unit test cases in a package
@@ -92,10 +92,10 @@ regular expression for the name of the test that should be run.
```sh
# Runs TestValidatePod in pkg/api/validation with the verbose flag set
-make test WHAT=pkg/api/validation KUBE_GOFLAGS="-v" KUBE_TEST_ARGS='-run ^TestValidatePod$'
+make test WHAT=./pkg/api/validation KUBE_GOFLAGS="-v" KUBE_TEST_ARGS='-run ^TestValidatePod$'
# Runs tests that match the regex ValidatePod|ValidateConfigMap in pkg/api/validation
-make test WHAT=pkg/api/validation KUBE_GOFLAGS="-v" KUBE_TEST_ARGS="-run ValidatePod\|ValidateConfigMap$"
+make test WHAT=./pkg/api/validation KUBE_GOFLAGS="-v" KUBE_TEST_ARGS="-run ValidatePod\|ValidateConfigMap$"
```
For other supported test flags, see the [golang
@@ -130,7 +130,7 @@ To run tests and collect coverage in only one package, pass its relative path
under the `kubernetes` directory as an argument, for example:
```sh
-make test WHAT=pkg/kubectl KUBE_COVER=y
+make test WHAT=./pkg/kubectl KUBE_COVER=y
```
Multiple arguments can be passed, in which case the coverage results will be