We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3c12863 + 9c26cdd commit f7262b7Copy full SHA for f7262b7
go/integration-tests-lib/go_integration_test.py
@@ -0,0 +1,18 @@
1
+import os
2
+from create_database_utils import *
3
+from diagnostics_test_utils import *
4
+
5
+def go_integration_test(source = "src"):
6
+ # Set up a GOPATH relative to this test's root directory;
7
+ # we set os.environ instead of using extra_env because we
8
+ # need it to be set for the call to "go clean -modcache" later
9
+ goPath = os.path.join(os.path.abspath(os.getcwd()), ".go")
10
+ os.environ['GOPATH'] = goPath
11
12
+ run_codeql_database_create([], lang="go", source=source)
13
14
+ check_diagnostics()
15
16
+ # Clean up the temporary GOPATH to prevent Bazel failures next
17
+ # time the tests are run; see https://github.com/golang/go/issues/27161
18
+ subprocess.call(["go", "clean", "-modcache"])
0 commit comments