Skip to content

Commit

Permalink
Merge pull request #224393 from microsoft/tyriar/216564
Browse files Browse the repository at this point in the history
Skip all terminal smoke tests on Linux
  • Loading branch information
Tyriar authored Jul 31, 2024
2 parents b18a8c5 + 249b7c2 commit cfcc0cd
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 34 deletions.
10 changes: 5 additions & 5 deletions test/smoke/src/areas/terminal/terminal-editors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import { Application, Terminal, TerminalCommandId, TerminalCommandIdWithValue, SettingsEditor } from '../../../../automation';
import { setTerminalTestSettings } from './terminal-helpers';

export function setup() {
describe('Terminal Editors', () => {
export function setup(options?: { skipSuite: boolean }) {
(options?.skipSuite ? describe.skip : describe)('Terminal Editors', () => {
let app: Application;
let terminal: Terminal;
let settingsEditor: SettingsEditor;
Expand Down Expand Up @@ -56,19 +56,19 @@ export function setup() {
await terminal.assertEditorGroupCount(2);
});

it.skip('should create new terminals in the active editor group via command', async () => {
it('should create new terminals in the active editor group via command', async () => {
await terminal.runCommand(TerminalCommandId.CreateNewEditor);
await terminal.runCommand(TerminalCommandId.CreateNewEditor);
await terminal.assertEditorGroupCount(1);
});

it.skip('should create new terminals in the active editor group via plus button', async () => {
it('should create new terminals in the active editor group via plus button', async () => {
await terminal.runCommand(TerminalCommandId.CreateNewEditor);
await terminal.clickPlusButton();
await terminal.assertEditorGroupCount(1);
});

it.skip('should create a terminal in the editor area by default', async () => {
it('should create a terminal in the editor area by default', async () => {
await app.workbench.settingsEditor.addUserSetting('terminal.integrated.defaultLocation', '"editor"');
// Close the settings editor
await app.workbench.quickaccess.runCommand('workbench.action.closeAllEditors');
Expand Down
4 changes: 2 additions & 2 deletions test/smoke/src/areas/terminal/terminal-input.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import { Application, Terminal, SettingsEditor } from '../../../../automation';
import { setTerminalTestSettings } from './terminal-helpers';

export function setup() {
describe('Terminal Input', () => {
export function setup(options?: { skipSuite: boolean }) {
(options?.skipSuite ? describe.skip : describe)('Terminal Input', () => {
let terminal: Terminal;
let settingsEditor: SettingsEditor;

Expand Down
6 changes: 3 additions & 3 deletions test/smoke/src/areas/terminal/terminal-persistence.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import { Application, Terminal, TerminalCommandId, TerminalCommandIdWithValue, SettingsEditor } from '../../../../automation';
import { setTerminalTestSettings } from './terminal-helpers';

export function setup() {
describe('Terminal Persistence', () => {
export function setup(options?: { skipSuite: boolean }) {
(options?.skipSuite ? describe.skip : describe)('Terminal Persistence', () => {
// Acquire automation API
let terminal: Terminal;
let settingsEditor: SettingsEditor;
Expand Down Expand Up @@ -49,7 +49,7 @@ export function setup() {
]);
});

it.skip('should persist buffer content', async () => {
it('should persist buffer content', async () => {
await terminal.createTerminal();
// TODO: Handle passing in an actual regex, not string
await terminal.assertTerminalGroups([
Expand Down
10 changes: 5 additions & 5 deletions test/smoke/src/areas/terminal/terminal-profiles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { setTerminalTestSettings } from './terminal-helpers';
const CONTRIBUTED_PROFILE_NAME = `JavaScript Debug Terminal`;
const ANY_PROFILE_NAME = '^((?!JavaScript Debug Terminal).)*$';

export function setup() {
describe('Terminal Profiles', () => {
export function setup(options?: { skipSuite: boolean }) {
(options?.skipSuite ? describe.skip : describe)('Terminal Profiles', () => {
// Acquire automation API
let terminal: Terminal;
let settingsEditor: SettingsEditor;
Expand All @@ -31,13 +31,13 @@ export function setup() {
await terminal.assertSingleTab({ name: ANY_PROFILE_NAME });
});

it.skip('should set the default profile to a contributed one', async () => {
it('should set the default profile to a contributed one', async () => {
await terminal.runCommandWithValue(TerminalCommandIdWithValue.SelectDefaultProfile, CONTRIBUTED_PROFILE_NAME);
await terminal.createTerminal();
await terminal.assertSingleTab({ name: CONTRIBUTED_PROFILE_NAME });
});

it.skip('should use the default contributed profile on panel open and for splitting', async () => {
it('should use the default contributed profile on panel open and for splitting', async () => {
await terminal.runCommandWithValue(TerminalCommandIdWithValue.SelectDefaultProfile, CONTRIBUTED_PROFILE_NAME);
await terminal.runCommand(TerminalCommandId.Show);
await terminal.runCommand(TerminalCommandId.Split);
Expand All @@ -62,7 +62,7 @@ export function setup() {
await terminal.assertSingleTab({ name: ANY_PROFILE_NAME });
});

it.skip('createWithProfile command should create a terminal with a contributed profile', async () => {
it('createWithProfile command should create a terminal with a contributed profile', async () => {
await terminal.runCommandWithValue(TerminalCommandIdWithValue.NewWithProfile, CONTRIBUTED_PROFILE_NAME);
await terminal.assertSingleTab({ name: CONTRIBUTED_PROFILE_NAME });
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import { Application, Terminal, SettingsEditor, TerminalCommandIdWithValue, TerminalCommandId } from '../../../../automation';
import { setTerminalTestSettings } from './terminal-helpers';

export function setup() {
describe('Terminal Shell Integration', () => {
export function setup(options?: { skipSuite: boolean }) {
(options?.skipSuite ? describe.skip : describe)('Terminal Shell Integration', () => {
let terminal: Terminal;
let settingsEditor: SettingsEditor;
let app: Application;
Expand Down
4 changes: 2 additions & 2 deletions test/smoke/src/areas/terminal/terminal-splitCwd.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import { Application, Terminal, SettingsEditor } from '../../../../automation';
import { setTerminalTestSettings } from './terminal-helpers';

export function setup() {
describe('Terminal splitCwd', () => {
export function setup(options?: { skipSuite: boolean }) {
(options?.skipSuite ? describe.skip : describe)('Terminal splitCwd', () => {
// Acquire automation API
let terminal: Terminal;
let settingsEditor: SettingsEditor;
Expand Down
4 changes: 2 additions & 2 deletions test/smoke/src/areas/terminal/terminal-stickyScroll.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import { Application, Terminal, SettingsEditor, TerminalCommandIdWithValue } from '../../../../automation';
import { setTerminalTestSettings } from './terminal-helpers';

export function setup() {
describe('Terminal stickyScroll', () => {
export function setup(options?: { skipSuite: boolean }) {
(options?.skipSuite ? describe.skip : describe)('Terminal stickyScroll', () => {
// Acquire automation API
let app: Application;
let terminal: Terminal;
Expand Down
6 changes: 3 additions & 3 deletions test/smoke/src/areas/terminal/terminal-tabs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import { Application, Terminal, TerminalCommandId, TerminalCommandIdWithValue, SettingsEditor } from '../../../../automation';
import { setTerminalTestSettings } from './terminal-helpers';

export function setup() {
describe('Terminal Tabs', () => {
export function setup(options?: { skipSuite: boolean }) {
(options?.skipSuite ? describe.skip : describe)('Terminal Tabs', () => {
// Acquire automation API
let terminal: Terminal;
let settingsEditor: SettingsEditor;
Expand Down Expand Up @@ -36,7 +36,7 @@ export function setup() {
await terminal.assertSingleTab({ name });
});

// TODO: Flaky https://github.com/microsoft/vscode/issues/216564
// DEBT: Flaky https://github.com/microsoft/vscode/issues/216564
it.skip('should reset the tab name to the default value when no name is provided', async () => {
await terminal.createTerminal();
const defaultName = await terminal.getSingleTabName();
Expand Down
23 changes: 13 additions & 10 deletions test/smoke/src/areas/terminal/terminal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,18 @@ export function setup(logger: Logger) {
await terminal.runCommand(TerminalCommandId.KillAll);
});

setupTerminalEditorsTests();
setupTerminalInputTests();
setupTerminalPersistenceTests();
setupTerminalProfileTests();
setupTerminalTabsTests();
setupTerminalShellIntegrationTests();
setupTerminalStickyScrollTests();
if (!process.platform.startsWith('win')) {
setupTerminalSplitCwdTests();
}
// https://github.com/microsoft/vscode/issues/216564
// The pty host can crash on Linux in smoke tests for an unknown reason. We need more user
// reports to investigate
setupTerminalEditorsTests({ skipSuite: process.platform === 'linux' });
setupTerminalInputTests({ skipSuite: process.platform === 'linux' });
setupTerminalPersistenceTests({ skipSuite: process.platform === 'linux' });
setupTerminalProfileTests({ skipSuite: process.platform === 'linux' });
setupTerminalTabsTests({ skipSuite: process.platform === 'linux' });
setupTerminalShellIntegrationTests({ skipSuite: process.platform === 'linux' });
setupTerminalStickyScrollTests({ skipSuite: process.platform === 'linux' });
// https://github.com/microsoft/vscode/pull/141974
// Windows is skipped here as well as it was never enabled from the start
setupTerminalSplitCwdTests({ skipSuite: process.platform === 'linux' || process.platform === 'win32' });
});
}

0 comments on commit cfcc0cd

Please sign in to comment.