Skip to content

Commit 354ea27

Browse files
committed
[release] src/testUtils.ts: always run test in package list mode
During v0.16 dev cycle, we switched tests to run in local directory mode by not specifying the target package path to be tested. This has two unintended side-effects: 1) prints all stderr/stdout from the tested target when tests succeed. 2) disables test caching. Whether `Go: Test Package` should run the tests in local directory mode or in package list mode is debatable. https://golang.org/cmd/go/#hdr-Test_packages But, we've been using the package list mode for a long time without complaint. So, this is a regression that needs to be fixed. Fixes #528 Change-Id: Ied06130db1ab6e53b2fb3a3b19ab13b0985fc779 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/248738 Run-TryBot: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Rebecca Stambler <[email protected]> Reviewed-by: Suzy Mueller <[email protected]> (cherry picked from commit a357893e7b5c24c1443deaca629584e47b4e22c2) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/252119
1 parent 903ccc7 commit 354ea27

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/testUtils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ export async function goTest(testconfig: TestConfig): Promise<boolean> {
293293
let pkgMapPromise: Promise<Map<string, string> | null> = Promise.resolve(null);
294294

295295
if (testconfig.isMod) {
296+
getCurrentPackagePromise = getCurrentPackage(testconfig.dir);
296297
// We need the mapping to get absolute paths for the files in the test output.
297298
pkgMapPromise = getNonVendorPackages(testconfig.dir, !!testconfig.includeSubDirectories);
298299
} else { // GOPATH mode

0 commit comments

Comments
 (0)