@@ -616,11 +616,19 @@ export async function testRun() {
616
616
// argv array is something like ['gulp', 'test', '-t', 'something'], we look for the one after -t
617
617
const testFilter = process . argv . find ( ( v , i , a ) => i > 0 && a [ i - 1 ] === "-t" ) ;
618
618
619
- // adjust the launch arguments depending on the environment
619
+ // adjust the launch arguments and env vars depending on the environment
620
+ // (darwin CI needs to run in headless mode)
621
+ let extensionTestsEnv = { } ;
620
622
const launchArgs = [ ] ;
621
- if ( IS_CI && IS_MAC ) {
622
- launchArgs . push ( "--disable-gpu" , "--disable-extensions" , "--disable-telemetry" ) ;
623
- } else {
623
+ if ( ! ( IS_CI && IS_MAC ) ) {
624
+ extensionTestsEnv = {
625
+ ELECTRON_ENABLE_LOGGING : "true" ,
626
+ ELECTRON_ENABLE_STACK_DUMPING : "true" ,
627
+ ELECTRON_NO_ATTACH_CONSOLE : "true" ,
628
+ ELECTRON_NO_SANDBOX : "1" ,
629
+ VSCODE_CLI : "1" ,
630
+ ELECTRON_RUN_AS_NODE : "1" ,
631
+ } ;
624
632
launchArgs . push (
625
633
"--no-sandbox" ,
626
634
"--profile-temp" ,
@@ -632,26 +640,21 @@ export async function testRun() {
632
640
"--disable-workspace-trust" ,
633
641
"--disable-extensions" ,
634
642
) ;
643
+ } else {
644
+ extensionTestsEnv = {
645
+ // used by https://mochajs.org/api/mocha#fgrep for running isolated tests
646
+ FGREP : testFilter ,
647
+ } ;
635
648
}
649
+ console . log ( `Running tests for ${ process . platform } -${ process . arch } ` ) ;
650
+ console . log ( `Launch args: ${ launchArgs . join ( " " ) } ` ) ;
651
+ console . log ( `Env vars: ${ JSON . stringify ( extensionTestsEnv ) } ` ) ;
636
652
637
653
await runTests ( {
638
654
version : process . env . VSCODE_VERSION ,
639
655
extensionDevelopmentPath : resolve ( DESTINATION ) ,
640
656
extensionTestsPath : resolve ( DESTINATION + "/src/testing.js" ) ,
641
- extensionTestsEnv : {
642
- // used by https://mochajs.org/api/mocha#fgrep for running isolated tests
643
- FGREP : testFilter ,
644
- // additional environment variables for macOS in CI for headless mode
645
- ...( IS_CI &&
646
- IS_MAC && {
647
- ELECTRON_ENABLE_LOGGING : "true" ,
648
- ELECTRON_ENABLE_STACK_DUMPING : "true" ,
649
- ELECTRON_NO_ATTACH_CONSOLE : "true" ,
650
- ELECTRON_NO_SANDBOX : "1" ,
651
- VSCODE_CLI : "1" ,
652
- ELECTRON_RUN_AS_NODE : "1" ,
653
- } ) ,
654
- } ,
657
+ extensionTestsEnv,
655
658
launchArgs,
656
659
} ) ;
657
660
0 commit comments