Fix build error for make test-unit
This fix tries to address the issue raised by #33856 where `make test-unit` will result in the failure: ``` ... ... dockerversion/useragent.go:20: undefined: Version dockerversion/useragent.go:22: undefined: GitCommit ok github.com/docker/docker/api 0.026s coverage: 68.0% of statements ok github.com/docker/docker/api/errors 0.003s coverage: 100.0% of statements FAIL github.com/docker/docker/api/server [build failed] make: *** [test-unit] Error 2 ``` The issue is because in case of `make test-unit`, `source "${MAKEDIR}/.go-autogen"` is missing. This caused the `make test-unit` failure. This fix adds `source "${MAKEDIR}/.go-autogen"` in `hack/make/test-unit` This fix fixes #33856. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> Upstream-commit: fac486d0a02d6af2759f6d0e81bd8a23d82d432c Component: engine
This commit is contained in:
@ -26,6 +26,8 @@ bundle_test_unit() {
|
||||
TEST_PATH=./${TESTDIRS}
|
||||
fi
|
||||
|
||||
source "${MAKEDIR}/.go-autogen"
|
||||
|
||||
if [ "$(go env GOHOSTOS)" = 'solaris' ]; then
|
||||
pkg_list=$(go list -e \
|
||||
-f '{{if ne .Name "github.com/docker/docker"}}
|
||||
|
||||
Reference in New Issue
Block a user