Skip to content

Commit 4a71ddd

Browse files
authored
Merge pull request #15355 from github/mbg/go/increase-test-robustness
Go: Improve robustness of integration tests
2 parents 2d71294 + 783f006 commit 4a71ddd

File tree

98 files changed

+249
-47
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+249
-47
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
#select
2+
| src/test.go:0:0:0:0 | src/test.go |
3+
| src/todel.go:0:0:0:0 | src/todel.go |
14
htmlFiles
25
extractionErrors
36
| Extraction failed in test.go with error \tother declaration of test | 2 |
47
| Extraction failed in todel.go with error test redeclared in this block | 2 |
5-
#select
6-
| test.go:0:0:0:0 | test.go |
7-
| todel.go:0:0:0:0 | todel.go |
Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
import sys
1+
import os
2+
import subprocess
23

34
from create_database_utils import *
45
from diagnostics_test_utils import *
56

6-
run_codeql_database_create([], lang="go")
7+
# Set up a GOPATH relative to this test's root directory;
8+
# we set os.environ instead of using extra_env because we
9+
# need it to be set for the call to "go clean -modcache" later
10+
goPath = os.path.join(os.path.abspath(os.getcwd()), ".go")
11+
os.environ['GOPATH'] = goPath
12+
13+
run_codeql_database_create([], lang="go", source="src")
714

815
check_diagnostics()
16+
17+
# Clean up the temporary GOPATH to prevent Bazel failures next
18+
# time the tests are run; see https://github.com/golang/go/issues/27161
19+
subprocess.call(["go", "clean", "-modcache"])

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy