@@ -43,6 +43,7 @@ import {
4343} from "../../../src/TestExplorer/TestUtils" ;
4444import { runnableTag } from "../../../src/TestExplorer/TestDiscovery" ;
4545import { Commands } from "../../../src/commands" ;
46+ import { SwiftToolchain } from "../../../src/toolchain/toolchain" ;
4647
4748suite ( "Test Explorer Suite" , function ( ) {
4849 const MAX_TEST_RUN_TIME_MINUTES = 5 ;
@@ -95,10 +96,32 @@ suite("Test Explorer Suite", function () {
9596 } ) ;
9697
9798 suite ( "CodeLLDB" , ( ) => {
99+ async function getLLDBDebugAdapterPath ( ) {
100+ switch ( process . platform ) {
101+ case "linux" :
102+ return "/usr/lib/liblldb.so" ;
103+ case "win32" :
104+ return await ( await SwiftToolchain . create ( ) ) . getLLDBDebugAdapter ( ) ;
105+ default :
106+ throw new Error ( "Please provide the path to lldb for this platform" ) ;
107+ }
108+ }
109+
98110 beforeEach ( async function ( ) {
111+ // CodeLLDB on windows doesn't print output and so cannot be parsed
112+ if ( process . platform === "win32" ) {
113+ this . skip ( ) ;
114+ return ;
115+ }
116+
117+ const lldbPath =
118+ process . env [ "CI" ] === "1"
119+ ? { "lldb.library" : await getLLDBDebugAdapterPath ( ) }
120+ : { } ;
121+
99122 const testContext = await setupTestExplorerTest ( {
100123 "swift.debugger.useDebugAdapterFromToolchain" : false ,
101- ...( process . env [ "CI" ] === "1" ? { "lldb.library" : "/usr/lib/liblldb.so" } : { } ) ,
124+ ...lldbPath ,
102125 } ) ;
103126
104127 workspaceContext = testContext . workspaceContext ;
0 commit comments