Skip to content

Commit

Permalink
test/integration/goDebug: set mode to 'debug' or 'test' not 'auto'
Browse files Browse the repository at this point in the history
When mode is 'auto', it is resolved to 'debug' or 'test' based on the
open file. However, we do not explicitly open any files, so we are
running these tests based on whatever the last opened file was. Instead
we want to explicitly set the mode to 'debug' or 'test'.

Change-Id: Ibe3a571c640292edb75434323623bfbebb18bfeb
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/312750
Trust: Suzy Mueller <[email protected]>
Run-TryBot: Suzy Mueller <[email protected]>
Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
TryBot-Result: kokoro <[email protected]>
  • Loading branch information
suzmue committed Apr 22, 2021
1 parent 9bc6048 commit 5bcfcac
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions test/integration/goDebug.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM
};
const debugConfig = await initializeDebugConfig(config);
Expand All @@ -544,7 +544,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM,
stopOnEntry: true
};
Expand All @@ -569,7 +569,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch file',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM
};

Expand Down Expand Up @@ -616,7 +616,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM,
dlvFlags: ['--invalid']
};
Expand All @@ -641,7 +641,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM
};
const debugConfig = await initializeDebugConfig(config);
Expand All @@ -665,7 +665,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM
};
const debugConfig = await initializeDebugConfig(config);
Expand All @@ -685,7 +685,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM,
dlvFlags: ['--listen=127.0.0.1:80']
};
Expand Down Expand Up @@ -934,7 +934,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM
};
const debugConfig = await initializeDebugConfig(config);
Expand Down Expand Up @@ -1029,7 +1029,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch file',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM
};
const debugConfig = await initializeDebugConfig(config);
Expand Down Expand Up @@ -1059,7 +1059,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch file',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM
};
const debugConfig = await initializeDebugConfig(config);
Expand Down Expand Up @@ -1123,7 +1123,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM
};
const debugConfig = await initializeDebugConfig(config);
Expand Down Expand Up @@ -1159,7 +1159,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM
};
const debugConfig = await initializeDebugConfig(config);
Expand Down Expand Up @@ -1199,7 +1199,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM
};
const debugConfig = await initializeDebugConfig(config);
Expand Down Expand Up @@ -1254,7 +1254,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM_WITH_EXCEPTION
};
const debugConfig = await initializeDebugConfig(config);
Expand Down Expand Up @@ -1288,7 +1288,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM_WITH_EXCEPTION
};
const debugConfig = await initializeDebugConfig(config);
Expand All @@ -1315,7 +1315,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM_WITH_EXCEPTION
};
const debugConfig = await initializeDebugConfig(config);
Expand Down Expand Up @@ -1382,7 +1382,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM,
stopOnEntry: false
};
Expand All @@ -1403,7 +1403,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM,
stopOnEntry: false
};
Expand All @@ -1428,7 +1428,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM,
stopOnEntry: true
};
Expand All @@ -1455,7 +1455,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM,
stopOnEntry: false
};
Expand All @@ -1479,7 +1479,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM
};
const debugConfig = await initializeDebugConfig(config);
Expand All @@ -1505,7 +1505,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM
};
const debugConfig = await initializeDebugConfig(config);
Expand All @@ -1526,7 +1526,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM,
stopOnEntry: true
};
Expand All @@ -1548,7 +1548,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => {
name: 'Launch',
type: 'go',
request: 'launch',
mode: 'auto',
mode: 'debug',
program: PROGRAM,
stopOnEntry: true
};
Expand Down

0 comments on commit 5bcfcac

Please sign in to comment.