Go: fixing tests for Go 1.16.
In Go 1.16, the module-aware mode is enabled by default; to fall back to previous behavior, the GO111MODULE environment variable should be set to 'auto'. Details: https://golang.org/doc/go1.16
This commit is contained in:
@@ -111,7 +111,7 @@ install: ${NXT_GO}-install
|
|||||||
${NXT_GO}:
|
${NXT_GO}:
|
||||||
|
|
||||||
${NXT_GO}-install: ${NXT_GO}-install-src ${NXT_GO}-install-env
|
${NXT_GO}-install: ${NXT_GO}-install-src ${NXT_GO}-install-env
|
||||||
GOPATH=\$(DESTDIR)\$(GOPATH) ${NXT_GO} build ${NXT_GO_PKG}
|
GOPATH=\$(DESTDIR)\$(GOPATH) GO111MODULE=auto ${NXT_GO} build ${NXT_GO_PKG}
|
||||||
|
|
||||||
${NXT_GO}-install-src:
|
${NXT_GO}-install-src:
|
||||||
install -d \$(DESTDIR)\$(NXT_GO_DST)/src/${NXT_GO_PKG}
|
install -d \$(DESTDIR)\$(NXT_GO_DST)/src/${NXT_GO_PKG}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ class TestApplicationGo(TestApplicationProto):
|
|||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env['GOPATH'] = option.current_dir + '/build/go'
|
env['GOPATH'] = option.current_dir + '/build/go'
|
||||||
env['GOCACHE'] = option.cache_dir + '/go'
|
env['GOCACHE'] = option.cache_dir + '/go'
|
||||||
|
env['GO111MODULE'] = 'auto'
|
||||||
|
|
||||||
if static:
|
if static:
|
||||||
args = [
|
args = [
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ def check_go(current_dir, temp_dir, test_dir):
|
|||||||
|
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env['GOPATH'] = current_dir + '/build/go'
|
env['GOPATH'] = current_dir + '/build/go'
|
||||||
|
env['GO111MODULE'] = 'auto'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
process = subprocess.Popen(
|
process = subprocess.Popen(
|
||||||
|
|||||||
Reference in New Issue
Block a user