mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
enable smoketest on linux
This commit is contained in:
parent
0c6caa8fe3
commit
85a36ae074
|
@ -48,7 +48,7 @@ steps:
|
||||||
|
|
||||||
- task: Cache@2
|
- task: Cache@2
|
||||||
inputs:
|
inputs:
|
||||||
key: 'nodeModules | $(Agent.OS) | .build/yarnlockhash'
|
key: "nodeModules | $(Agent.OS) | .build/yarnlockhash"
|
||||||
path: .build/node_modules_cache
|
path: .build/node_modules_cache
|
||||||
cacheHitVar: NODE_MODULES_RESTORED
|
cacheHitVar: NODE_MODULES_RESTORED
|
||||||
displayName: Restore node_modules cache
|
displayName: Restore node_modules cache
|
||||||
|
@ -131,14 +131,14 @@ steps:
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
DISPLAY=:10 ./scripts/test.sh --build --tfs "Unit Tests"
|
./scripts/test.sh --build --tfs "Unit Tests"
|
||||||
displayName: Run unit tests (Electron)
|
displayName: Run unit tests (Electron)
|
||||||
timeoutInMinutes: 7
|
timeoutInMinutes: 7
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
DISPLAY=:10 yarn test-browser --build --browser chromium --tfs "Browser Unit Tests"
|
yarn test-browser --build --browser chromium --tfs "Browser Unit Tests"
|
||||||
displayName: Run unit tests (Browser)
|
displayName: Run unit tests (Browser)
|
||||||
timeoutInMinutes: 7
|
timeoutInMinutes: 7
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
@ -159,7 +159,7 @@ steps:
|
||||||
INTEGRATION_TEST_APP_NAME="$APP_NAME" \
|
INTEGRATION_TEST_APP_NAME="$APP_NAME" \
|
||||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
||||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
|
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
|
||||||
DISPLAY=:10 ./scripts/test-integration.sh --build --tfs "Integration Tests"
|
./scripts/test-integration.sh --build --tfs "Integration Tests"
|
||||||
displayName: Run integration tests (Electron)
|
displayName: Run integration tests (Electron)
|
||||||
timeoutInMinutes: 10
|
timeoutInMinutes: 10
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
@ -167,7 +167,7 @@ steps:
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-$(VSCODE_ARCH)" \
|
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-$(VSCODE_ARCH)" \
|
||||||
DISPLAY=:10 ./resources/server/test/test-web-integration.sh --browser chromium
|
./resources/server/test/test-web-integration.sh --browser chromium
|
||||||
displayName: Run integration tests (Browser)
|
displayName: Run integration tests (Browser)
|
||||||
timeoutInMinutes: 10
|
timeoutInMinutes: 10
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
@ -179,11 +179,42 @@ steps:
|
||||||
INTEGRATION_TEST_APP_NAME="$APP_NAME" \
|
INTEGRATION_TEST_APP_NAME="$APP_NAME" \
|
||||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
||||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
|
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
|
||||||
DISPLAY=:10 ./resources/server/test/test-remote-integration.sh
|
./resources/server/test/test-remote-integration.sh
|
||||||
displayName: Run remote integration tests (Electron)
|
displayName: Run remote integration tests (Electron)
|
||||||
timeoutInMinutes: 7
|
timeoutInMinutes: 7
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set -e
|
||||||
|
yarn --cwd test/smoke compile
|
||||||
|
displayName: Compile smoke tests
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set -e
|
||||||
|
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||||
|
yarn smoketest-no-compile --build "$APP_PATH" --electronArgs="--disable-setuid-sandbox --disable-dev-shm-usage --use-gl=swiftshader"
|
||||||
|
timeoutInMinutes: 5
|
||||||
|
displayName: Run smoke tests (Electron)
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set -e
|
||||||
|
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||||
|
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
|
||||||
|
yarn smoketest-no-compile --build "$APP_PATH" --remote --electronArgs="--disable-setuid-sandbox --disable-dev-shm-usage --use-gl=swiftshader"
|
||||||
|
timeoutInMinutes: 5
|
||||||
|
displayName: Run smoke tests (Remote)
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set -e
|
||||||
|
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-$(VSCODE_ARCH)" \
|
||||||
|
yarn smoketest-no-compile --web --headless --electronArgs="--disable-setuid-sandbox --disable-dev-shm-usage --use-gl=swiftshader"
|
||||||
|
timeoutInMinutes: 5
|
||||||
|
displayName: Run smoke tests (Browser)
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@0
|
- task: PublishPipelineArtifact@0
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: "crash-dump-linux-$(VSCODE_ARCH)"
|
artifactName: "crash-dump-linux-$(VSCODE_ARCH)"
|
||||||
|
|
|
@ -176,6 +176,7 @@ stages:
|
||||||
variables:
|
variables:
|
||||||
VSCODE_ARCH: x64
|
VSCODE_ARCH: x64
|
||||||
NPM_ARCH: x64
|
NPM_ARCH: x64
|
||||||
|
DISPLAY: ":10"
|
||||||
steps:
|
steps:
|
||||||
- template: linux/product-build-linux.yml
|
- template: linux/product-build-linux.yml
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"tmp": "0.1.0",
|
"tmp": "0.1.0",
|
||||||
"tree-kill": "1.2.2",
|
"tree-kill": "1.2.2",
|
||||||
"typescript": "3.7.5",
|
"typescript": "^4.3.2",
|
||||||
"vscode-uri": "^2.0.3",
|
"vscode-uri": "^2.0.3",
|
||||||
"watch": "^1.0.2"
|
"watch": "^1.0.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,17 +123,8 @@ export class Application {
|
||||||
|
|
||||||
private async startApplication(extraArgs: string[] = []): Promise<any> {
|
private async startApplication(extraArgs: string[] = []): Promise<any> {
|
||||||
this._code = await spawn({
|
this._code = await spawn({
|
||||||
codePath: this.options.codePath,
|
...this.options,
|
||||||
workspacePath: this.workspacePathOrFolder,
|
extraArgs: [...(this.options.extraArgs || []), ...extraArgs],
|
||||||
userDataDir: this.userDataPath,
|
|
||||||
extensionsPath: this.options.extensionsPath,
|
|
||||||
logger: this.options.logger,
|
|
||||||
verbose: this.options.verbose,
|
|
||||||
log: this.options.log,
|
|
||||||
extraArgs,
|
|
||||||
remote: this.options.remote,
|
|
||||||
web: this.options.web,
|
|
||||||
browser: this.options.browser
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this._workbench = new Workbench(this._code, this.userDataPath);
|
this._workbench = new Workbench(this._code, this.userDataPath);
|
||||||
|
|
|
@ -128,7 +128,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
||||||
return connect(connectDriver, child, '', handle, options.logger);
|
return connect(connectDriver, child, '', handle, options.logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
const env = process.env;
|
const env = { ...process.env };
|
||||||
const codePath = options.codePath;
|
const codePath = options.codePath;
|
||||||
const outPath = codePath ? getBuildOutPath(codePath) : getDevOutPath();
|
const outPath = codePath ? getBuildOutPath(codePath) : getDevOutPath();
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ async function poll<T>(
|
||||||
} else {
|
} else {
|
||||||
lastError = 'Did not pass accept function';
|
lastError = 'Did not pass accept function';
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e: any) {
|
||||||
lastError = Array.isArray(e.stack) ? e.stack.join(os.EOL) : e.stack;
|
lastError = Array.isArray(e.stack) ? e.stack.join(os.EOL) : e.stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -659,10 +659,10 @@ tree-kill@1.2.2:
|
||||||
resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc"
|
resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc"
|
||||||
integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==
|
integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==
|
||||||
|
|
||||||
typescript@3.7.5:
|
typescript@^4.3.2:
|
||||||
version "3.7.5"
|
version "4.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805"
|
||||||
integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==
|
integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==
|
||||||
|
|
||||||
universalify@^2.0.0:
|
universalify@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
"rimraf": "^2.6.1",
|
"rimraf": "^2.6.1",
|
||||||
"strip-json-comments": "^2.0.1",
|
"strip-json-comments": "^2.0.1",
|
||||||
"tmp": "0.0.33",
|
"tmp": "0.0.33",
|
||||||
"typescript": "3.7.5",
|
"typescript": "^4.3.2",
|
||||||
"watch": "^1.0.2"
|
"watch": "^1.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,16 +38,9 @@ async function createWorkspaceFile(workspacePath: string): Promise<string> {
|
||||||
|
|
||||||
export function setup(opts: minimist.ParsedArgs) {
|
export function setup(opts: minimist.ParsedArgs) {
|
||||||
describe('Multiroot', () => {
|
describe('Multiroot', () => {
|
||||||
beforeSuite(opts);
|
beforeSuite(opts, async opts => {
|
||||||
|
const workspacePath = await createWorkspaceFile(opts.workspacePath);
|
||||||
before(async function () {
|
return { ...opts, workspacePath };
|
||||||
const app = this.app as Application;
|
|
||||||
|
|
||||||
const workspaceFilePath = await createWorkspaceFile(app.workspacePathOrFolder);
|
|
||||||
|
|
||||||
// restart with preventing additional windows from restoring
|
|
||||||
// to ensure the window after restart is the multi-root workspace
|
|
||||||
await app.restart({ workspaceOrFolder: workspaceFilePath });
|
|
||||||
});
|
});
|
||||||
|
|
||||||
afterSuite();
|
afterSuite();
|
||||||
|
|
|
@ -8,13 +8,8 @@ import minimist = require('minimist');
|
||||||
import { Application } from '../../../../automation';
|
import { Application } from '../../../../automation';
|
||||||
import { afterSuite, beforeSuite } from '../../utils';
|
import { afterSuite, beforeSuite } from '../../utils';
|
||||||
|
|
||||||
// function wait(ms: number): Promise<void> {
|
|
||||||
// return new Promise(r => setTimeout(r, ms));
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
export function setup(opts: minimist.ParsedArgs) {
|
export function setup(opts: minimist.ParsedArgs) {
|
||||||
describe('Notebooks', () => {
|
describe.skip('Notebooks', () => {
|
||||||
beforeSuite(opts);
|
beforeSuite(opts);
|
||||||
|
|
||||||
afterEach(async function () {
|
afterEach(async function () {
|
||||||
|
|
|
@ -47,7 +47,8 @@ const opts = minimist(args, {
|
||||||
'wait-time',
|
'wait-time',
|
||||||
'test-repo',
|
'test-repo',
|
||||||
'screenshots',
|
'screenshots',
|
||||||
'log'
|
'log',
|
||||||
|
'electronArgs'
|
||||||
],
|
],
|
||||||
boolean: [
|
boolean: [
|
||||||
'verbose',
|
'verbose',
|
||||||
|
@ -236,6 +237,7 @@ function createOptions(): ApplicationOptions {
|
||||||
loggers.push(new FileLogger(opts.log));
|
loggers.push(new FileLogger(opts.log));
|
||||||
log = 'trace';
|
log = 'trace';
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
quality,
|
quality,
|
||||||
codePath: opts.build,
|
codePath: opts.build,
|
||||||
|
@ -249,7 +251,8 @@ function createOptions(): ApplicationOptions {
|
||||||
screenshotsPath,
|
screenshotsPath,
|
||||||
remote: opts.remote,
|
remote: opts.remote,
|
||||||
web: opts.web,
|
web: opts.web,
|
||||||
browser: opts.browser
|
browser: opts.browser,
|
||||||
|
extraArgs: (opts.electronArgs || '').split(' ').map(a => a.trim()).filter(a => !!a)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,15 @@ export function itRepeat(n: number, description: string, callback: (this: Contex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function beforeSuite(opts: minimist.ParsedArgs) {
|
export function beforeSuite(opts: minimist.ParsedArgs, optionsTransform?: (opts: ApplicationOptions) => Promise<ApplicationOptions>) {
|
||||||
before(async function () {
|
before(async function () {
|
||||||
|
let options: ApplicationOptions = { ...this.defaultOptions };
|
||||||
|
|
||||||
|
if (optionsTransform) {
|
||||||
|
options = await optionsTransform(options);
|
||||||
|
}
|
||||||
|
|
||||||
// https://github.com/microsoft/vscode/issues/34988
|
// https://github.com/microsoft/vscode/issues/34988
|
||||||
const options = this.defaultOptions as ApplicationOptions;
|
|
||||||
const userDataPathSuffix = [...Array(8)].map(() => Math.random().toString(36)[3]).join('');
|
const userDataPathSuffix = [...Array(8)].map(() => Math.random().toString(36)[3]).join('');
|
||||||
const userDataDir = options.userDataDir.concat(`-${userDataPathSuffix}`);
|
const userDataDir = options.userDataDir.concat(`-${userDataPathSuffix}`);
|
||||||
|
|
||||||
|
|
|
@ -680,10 +680,10 @@ tmp@0.0.33:
|
||||||
dependencies:
|
dependencies:
|
||||||
os-tmpdir "~1.0.2"
|
os-tmpdir "~1.0.2"
|
||||||
|
|
||||||
typescript@3.7.5:
|
typescript@^4.3.2:
|
||||||
version "3.7.5"
|
version "4.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805"
|
||||||
integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==
|
integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==
|
||||||
|
|
||||||
util-deprecate@^1.0.1:
|
util-deprecate@^1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
|
|
Loading…
Reference in a new issue