kubernetes/hack/make-rules
Kubernetes Submit Queue 6a02660fbf Merge pull request #52165 from mattjmcnaughton/mattjmcnaughton/52025-more-descriptive-make-test-error-message
Automatic merge from submit-queue (batch tested with PRs 53101, 53158, 52165). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

More descriptive error message for `make test`

**Which issue this PR fixes**
Fix #52025

**What this PR does / why we need it**:

The `[packages]` argument to `go test` can be confusing. If the
`package` does not begin with `./`, `go test` considers it relative to
`$GOPATH/src`. If it does begin with `./`, `go test` considers it
relative to `pwd`. `hack/make-rules/test.sh`, and thus `make test`, use
`go test`.

This commit adds a verify step to `hack/make-rules/test.sh`. Before we
run `go test`, we check the packages under test exist. If the user
specified the package path in the incorrect format - for example they
didn't prepend with `./` when they should have, the check logs a
suggestion of the alternative path they should use.

Running the test suites for a package is an activity many all first time
contributors will take. Hopefully including a more descriptive error
message, with a suggestion for a fix if applicable, will make this an
easier experience.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>

```release-note
NONE
```
2017-09-29 14:36:22 -07:00
..
helpers Fixup after k8s.io/{kube-gen -> code-generator} rename 2017-08-17 17:55:12 +02:00
BUILD Remove kubectl's dependence on schema file in pkg/api/validation. 2017-08-16 16:38:28 -07:00
build.sh Add a verbosity concept to kubernetes scripts 2016-08-04 22:01:22 -07:00
cross.sh Add a KUBERNETES_NODE_* section to build kubelet/kube-proxy for windows 2016-12-17 21:07:18 -08:00
make-help.sh remove hardcoded ansi to tput so that color coding works in multiple platforms including osx. 2017-02-10 10:25:43 -08:00
test-cmd-util.sh Merge pull request #53158 from liggitt/update-pod-spec-versioned 2017-09-29 14:36:19 -07:00
test-cmd.sh *: remove --insecure-allow-any-token option 2017-07-18 16:03:15 -07:00
test-e2e-node.sh Switch away from gcloud deprecated flags in compute resource listings 2017-08-30 06:41:09 +01:00
test-federation-cmd.sh *: remove --insecure-allow-any-token option 2017-07-18 16:03:15 -07:00
test-integration.sh Move k/test/integration/federation to k/federation/test/integration 2017-09-28 11:43:35 +05:30
test-kubeadm-cmd.sh kubeadm: updated cmd tests as discussed in SIG 2017-02-07 12:47:07 -08:00
test.sh Merge pull request #52165 from mattjmcnaughton/mattjmcnaughton/52025-more-descriptive-make-test-error-message 2017-09-29 14:36:22 -07:00
verify.sh Add debugging to the codegen process 2017-08-25 14:08:42 -07:00
vet.sh Merge pull request #46923 from dims/nuke-wrapper-go-flags 2017-06-22 20:26:29 -07:00