@@ -400,10 +400,7 @@ export class TestRunner {
400
400
// Run swift-testing first, then XCTest.
401
401
// swift-testing being parallel by default should help these run faster.
402
402
if ( this . testArgs . hasSwiftTestingTests ) {
403
- const fifoPipePath =
404
- process . platform === "win32"
405
- ? `\\\\.\\pipe\\vscodemkfifo-${ Date . now ( ) } `
406
- : path . join ( os . tmpdir ( ) , `vscodemkfifo-${ Date . now ( ) } ` ) ;
403
+ const fifoPipePath = this . generateFifoPipePath ( ) ;
407
404
408
405
await TemporaryFolder . withNamedTemporaryFile ( fifoPipePath , async ( ) => {
409
406
// macOS/Linux require us to create the named pipe before we use it.
@@ -689,19 +686,16 @@ export class TestRunner {
689
686
}
690
687
691
688
const buildConfigs : Array < vscode . DebugConfiguration | undefined > = [ ] ;
692
- const fifoPipePath =
693
- process . platform === "win32"
694
- ? `\\\\.\\pipe\\vscodemkfifo-${ Date . now ( ) } `
695
- : path . join ( os . tmpdir ( ) , `vscodemkfifo-${ Date . now ( ) } ` ) ;
689
+ const fifoPipePath = this . generateFifoPipePath ( ) ;
696
690
697
691
await TemporaryFolder . withNamedTemporaryFile ( fifoPipePath , async ( ) => {
698
- // macOS/Linux require us to create the named pipe before we use it.
699
- // Windows just lets us communicate by specifying a pipe path without any ceremony.
700
- if ( process . platform !== "win32" ) {
701
- await execFile ( "mkfifo" , [ fifoPipePath ] , undefined , this . folderContext ) ;
702
- }
703
-
704
692
if ( this . testArgs . hasSwiftTestingTests ) {
693
+ // macOS/Linux require us to create the named pipe before we use it.
694
+ // Windows just lets us communicate by specifying a pipe path without any ceremony.
695
+ if ( process . platform !== "win32" ) {
696
+ await execFile ( "mkfifo" , [ fifoPipePath ] , undefined , this . folderContext ) ;
697
+ }
698
+
705
699
const swiftTestBuildConfig = TestingDebugConfigurationFactory . swiftTestingConfig (
706
700
this . folderContext ,
707
701
fifoPipePath ,
@@ -855,6 +849,12 @@ export class TestRunner {
855
849
return new NonDarwinTestItemFinder ( this . testArgs . testItems , this . folderContext ) ;
856
850
}
857
851
}
852
+
853
+ private generateFifoPipePath ( ) : string {
854
+ return process . platform === "win32"
855
+ ? `\\\\.\\pipe\\vscodemkfifo-${ Date . now ( ) } `
856
+ : path . join ( os . tmpdir ( ) , `vscodemkfifo-${ Date . now ( ) } ` ) ;
857
+ }
858
858
}
859
859
860
860
/** Interface defining how to find test items given a test id from XCTest output */
0 commit comments