mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Support make test WHAT=path/to/pkg/...
In 99cdc069e2
, we added a check for
whether the directory the user was attempting to test existed or not.
However, adding this check prevented us from running `make test
WHAT=./path/to/pkg/...`, because we believed that `./path/to/pkg/...`
wasn't a valid path to a directory.
Fix this by stripping `/...` before checking whether the directory
exists.
This commit is contained in:
parent
0fdb65efa0
commit
2d3ad78cf9
@ -223,6 +223,10 @@ verifyAndSuggestPackagePath() {
|
|||||||
local original_package_path="$3"
|
local original_package_path="$3"
|
||||||
local suggestion_package_path="$4"
|
local suggestion_package_path="$4"
|
||||||
|
|
||||||
|
if [[ "${specified_package_path}" =~ '/...'$ ]]; then
|
||||||
|
specified_package_path=${specified_package_path::-4}
|
||||||
|
fi
|
||||||
|
|
||||||
if ! [ -d "${specified_package_path}" ]; then
|
if ! [ -d "${specified_package_path}" ]; then
|
||||||
# Because k8s sets a localized $GOPATH for testing, seeing the actual
|
# Because k8s sets a localized $GOPATH for testing, seeing the actual
|
||||||
# directory can be confusing. Instead, just show $GOPATH if it exists in the
|
# directory can be confusing. Instead, just show $GOPATH if it exists in the
|
||||||
|
Loading…
Reference in New Issue
Block a user