Skip to content

Commit 58ef9f4

Browse files
committed
Go: Run resolve build-environment in integration tests
1 parent 99335e5 commit 58ef9f4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

go/integration-tests-lib/go_integration_test.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
import os
22
from create_database_utils import *
33
from diagnostics_test_utils import *
4+
from resolve_environment_utils import *
45

5-
def go_integration_test(source = "src", db = "db", runFunction = runSuccessfully):
6+
def go_integration_test(toolchain=None, source = "src", db = "db", runFunction = runSuccessfully):
67
# Set up a GOPATH relative to this test's root directory;
78
# we set os.environ instead of using extra_env because we
89
# need it to be set for the call to "go clean -modcache" later
910
goPath = os.path.join(os.path.abspath(os.getcwd()), ".go")
1011
os.environ['GOPATH'] = goPath
1112

13+
extra_env = None
14+
15+
if toolchain != None:
16+
extra_env = { 'GOTOOLCHAIN': toolchain }
17+
1218
try:
19+
run_codeql_resolve_build_environment(lang="go", source=source, extra_env=extra_env)
1320
run_codeql_database_create([], lang="go", source=source, db=db, runFunction=runFunction)
1421

1522
check_diagnostics()

0 commit comments

Comments
 (0)