Skip to content

Commit 3091aae

Browse files
committed
Test only
1 parent f04c657 commit 3091aae

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

.vscode-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
const { defineConfig } = require("@vscode/test-cli");
1616
const path = require("path");
1717

18-
const isCIBuild = process.env["CI"] === "1";
18+
const isCIBuild = false; // process.env["CI"] === "1";
1919
const isFastTestRun = process.env["FAST_TEST_RUN"] === "1";
2020

2121
// "env" in launch.json doesn't seem to work with vscode-test

src/TestExplorer/TestRunner.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,7 @@ export class TestRunner {
849849
) as vscode.DebugConfiguration[];
850850

851851
const debugRuns = validBuildConfigs.map(config => {
852+
console.log("Debugging with profile", JSON.stringify(config));
852853
return () =>
853854
new Promise<void>((resolve, reject) => {
854855
if (this.testRun.isCancellationRequested) {
@@ -858,6 +859,7 @@ export class TestRunner {
858859

859860
// add cancelation
860861
const startSession = vscode.debug.onDidStartDebugSession(session => {
862+
console.log(">>> Debugging session started", JSON.stringify(session));
861863
if (config.testType === TestLibrary.xctest) {
862864
this.testRun.testRunStarted();
863865
}
@@ -884,10 +886,12 @@ export class TestRunner {
884886
});
885887
subscriptions.push(startSession);
886888

889+
console.log(">>> Start debugging...");
887890
vscode.debug
888891
.startDebugging(this.folderContext.workspaceFolder, config)
889892
.then(
890893
async started => {
894+
console.log(">>> Did start?", started);
891895
if (started) {
892896
if (config.testType === TestLibrary.swiftTesting) {
893897
// Watch the pipe for JSONL output and parse the events into test explorer updates.
@@ -925,6 +929,7 @@ export class TestRunner {
925929
}
926930
},
927931
reason => {
932+
console.log(">>> Failed to start", reason);
928933
subscriptions.forEach(sub => sub.dispose());
929934
reject(reason);
930935
}
@@ -935,6 +940,7 @@ export class TestRunner {
935940
// Run each debugging session sequentially
936941
await debugRuns.reduce((p, fn) => p.then(() => fn()), Promise.resolve());
937942
});
943+
console.log(">>> All done!");
938944
}
939945

940946
/** Returns a callback that handles a chunk of stdout output from a test run. */

src/debugger/buildConfig.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,12 @@ function getBaseConfig(ctx: FolderContext, expandEnvVariables: boolean) {
649649
args: [],
650650
preLaunchTask: `swift: Build All${nameSuffix}`,
651651
terminal: "console",
652+
...(process.env["CI"] === "1"
653+
? {
654+
disableASLR: false,
655+
initCommands: ["settings set target.disable-aslr false"],
656+
}
657+
: {}),
652658
};
653659
}
654660

test/integration-tests/testexplorer/TestExplorerIntegration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ suite("Test Explorer Suite", function () {
6666
});
6767
}
6868

69-
suite("lldb-dap", () => {
69+
suite.only("lldb-dap", () => {
7070
beforeEach(async function () {
7171
const testContext = await setupTestExplorerTest({
7272
"swift.debugger.useDebugAdapterFromToolchain": true,

0 commit comments

Comments
 (0)