Skip to content

Commit 5a83a8c

Browse files
committed
Updating tests for new infrastructure
Author: Omar Elkhouly <omar.elkhouly@arm.com>
1 parent 8c0a543 commit 5a83a8c

File tree

5 files changed

+43
-5
lines changed

5 files changed

+43
-5
lines changed

src/integration-tests/config.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ describe('config', function () {
5151
}
5252

5353
it('can specify program via --config=', async function () {
54+
if (isRemoteTest) {
55+
this.skip();
56+
}
5457
const config = { program: emptyProgram };
5558
await verifyLaunchWorks(
5659
this,

src/integration-tests/launch.spec.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,22 @@ describe('launch', function () {
151151
});
152152

153153
it('works with a space in file names', async function () {
154-
await dc.hitBreakpoint(
154+
if (isRemoteTest) {
155+
await dc.hitBreakpoint(
156+
fillDefaults(this.test, {
157+
program: emptySpaceProgram,
158+
target: {
159+
port: 2333,
160+
serverParameters: [':2333', emptySpaceProgram]
161+
}
162+
} as unknown as TargetLaunchRequestArguments),
163+
{
164+
path: emptySpaceSrc,
165+
line: 3,
166+
}
167+
);
168+
} else {
169+
await dc.hitBreakpoint(
155170
fillDefaults(this.test, {
156171
program: emptySpaceProgram,
157172
} as LaunchRequestArguments),
@@ -160,6 +175,7 @@ describe('launch', function () {
160175
line: 3,
161176
}
162177
);
178+
}
163179
});
164180

165181
it('works with unicode in file names', async function () {

src/integration-tests/launchWithEnvironment.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ describe('launch with environment', function () {
7272
fillDefaults(test, {
7373
program: path.join(testProgramsDir, 'vars_env'),
7474
environment: environment,
75-
type: 'remote',
7675
target: {
7776
environment: targetEnvironment,
7877
port: 2333,

src/integration-tests/stopGDBServer.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
TargetLaunchArguments,
1515
} from '../types/session';
1616
import { CdtDebugClient } from './debugClient';
17-
import { fillDefaults, standardBeforeEach, testProgramsDir } from './utils';
17+
import { fillDefaults, isRemoteTest, standardBeforeEach, testProgramsDir } from './utils';
1818

1919
describe('stop gdbserver', function () {
2020
let dc: CdtDebugClient;
@@ -32,6 +32,9 @@ describe('stop gdbserver', function () {
3232
});
3333

3434
it('do something', async function () {
35+
if (!isRemoteTest) {
36+
this.skip();
37+
}
3538
await dc.hitBreakpoint(
3639
fillDefaults(this.test, {
3740
program: emptyProgram,

src/integration-tests/terminated.spec.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010

1111
// import { expect } from 'chai';
1212
import * as path from 'path';
13-
import { LaunchRequestArguments } from '../types/session';
13+
import { LaunchRequestArguments, TargetLaunchRequestArguments } from '../types/session';
1414
import { CdtDebugClient } from './debugClient';
1515
import {
1616
fillDefaults,
1717
getScopes,
18+
isRemoteTest,
1819
standardBeforeEach,
1920
testProgramsDir,
2021
} from './utils';
@@ -33,7 +34,22 @@ describe('terminated', function () {
3334
});
3435

3536
it('terminated event arrives after continuing after a breakpoint', async function () {
36-
await dc.hitBreakpoint(
37+
if (isRemoteTest) {
38+
await dc.hitBreakpoint(
39+
fillDefaults(this.test, {
40+
program: emptyProgram,
41+
target: {
42+
port: 2333,
43+
serverParameters: [':2333', emptyProgram]
44+
}
45+
} as unknown as TargetLaunchRequestArguments),
46+
{
47+
path: emptySrc,
48+
line: 3,
49+
}
50+
);
51+
} else {
52+
await dc.hitBreakpoint(
3753
fillDefaults(this.test, {
3854
program: emptyProgram,
3955
} as LaunchRequestArguments),
@@ -42,6 +58,7 @@ describe('terminated', function () {
4258
line: 3,
4359
}
4460
);
61+
}
4562

4663
await Promise.all([
4764
dc.waitForEvent('terminated'),

0 commit comments

Comments
 (0)