File tree Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -47,11 +47,6 @@ class TestRunner {
4747 ) ;
4848 }
4949 private async launchTest ( customEnvVars : Record < string , { } > ) {
50- const configurationTerminal = workspace . getConfiguration ( 'terminal' ) ;
51- await configurationTerminal . update ( 'integrated.defaultProfile.osx' , 'pwsh' , ConfigurationTarget . Global ) ;
52- await configurationTerminal . update ( 'integrated.defaultProfile.linux' , 'pwsh' , ConfigurationTarget . Global ) ;
53- await configurationTerminal . update ( 'integrated.defaultProfile.windows' , 'pwsh' , ConfigurationTarget . Global ) ;
54-
5550 console . log ( 'Launch tests in test runner' ) ;
5651 await new Promise < void > ( ( resolve , reject ) => {
5752 const env : Record < string , string > = {
Original file line number Diff line number Diff line change @@ -29,6 +29,29 @@ const extensionDevelopmentPath = process.env.CODE_EXTENSIONS_PATH
2929 ? process . env . CODE_EXTENSIONS_PATH
3030 : EXTENSION_ROOT_DIR_FOR_TESTS ;
3131
32+ // Make sure shell used are pwsh for smoke tests
33+ // create .vscode folder inside workspacePath and settings.json inside that .vscode path
34+ async function setupWorkspace ( ) {
35+ await fs . ensureDir ( path . join ( workspacePath , '.vscode' ) ) ;
36+ const settingsPath = path . join ( workspacePath , '.vscode' , 'settings.json' ) ;
37+ if ( ! ( await fs . pathExists ( settingsPath ) ) ) {
38+ await fs . writeFile (
39+ settingsPath ,
40+ `{
41+ "terminal.integrated.defaultProfile.linux": "pwsh",
42+ "terminal.integrated.defaultProfile.osx": "pwsh",
43+ "terminal.integrated.defaultProfile.windows": "pwsh"
44+ }` ,
45+ ) ;
46+ }
47+ }
48+ if ( process . env . TEST_FILES_SUFFIX !== 'smoke.test' ) {
49+ setupWorkspace ( ) . catch ( ( err ) => {
50+ console . error ( 'Failed to setup workspace for smoke test' , err ) ;
51+ process . exit ( 1 ) ;
52+ } ) ;
53+ }
54+
3255/**
3356 * Smoke tests & tests running in VSCode require Jupyter extension to be installed.
3457 */
You can’t perform that action at this time.
0 commit comments