mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 00:09:30 +01:00
57 lines
2.1 KiB
TypeScript
57 lines
2.1 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import minimist from 'minimist';
|
|
import os from 'os';
|
|
import { setup as setupCliTests } from './cli.test.js';
|
|
import { TestContext } from './context.js';
|
|
import { setup as setupDesktopTests } from './desktop.test.js';
|
|
import { setup as setupServerTests } from './server.test.js';
|
|
import { setup as setupServerWebTests } from './serverWeb.test.js';
|
|
import { setup as setupWSLTests } from './wsl.test.js';
|
|
import { setup as setupDevTunnelTests } from './devTunnel.test.js';
|
|
|
|
const options = minimist(process.argv.slice(2), {
|
|
string: ['commit', 'quality', 'screenshots-dir'],
|
|
boolean: ['cleanup', 'verbose', 'signing-check', 'headless', 'detection'],
|
|
alias: { commit: 'c', quality: 'q', verbose: 'v', 'screenshots-dir': 's' },
|
|
default: { cleanup: true, verbose: false, 'signing-check': true, headless: true, 'detection': true },
|
|
});
|
|
|
|
if (!options.commit) {
|
|
throw new Error('--commit is required');
|
|
}
|
|
|
|
if (!options.quality) {
|
|
throw new Error('--quality is required');
|
|
}
|
|
|
|
const context = new TestContext({
|
|
quality: options.quality,
|
|
commit: options.commit,
|
|
verbose: options.verbose,
|
|
cleanup: options.cleanup,
|
|
checkSigning: options['signing-check'],
|
|
headlessBrowser: options.headless,
|
|
downloadOnly: !options['detection'],
|
|
screenshotsDir: options['screenshots-dir'],
|
|
});
|
|
|
|
context.log(`Arguments: ${process.argv.slice(2).join(' ')}`);
|
|
context.log(`Platform: ${os.platform()}, Architecture: ${os.arch()}`);
|
|
context.log(`Capabilities: ${Array.from(context.capabilities).join(', ')}`);
|
|
|
|
beforeEach(function () {
|
|
context.consoleOutputs = [];
|
|
(this.currentTest! as { consoleOutputs?: string[] }).consoleOutputs = context.consoleOutputs;
|
|
});
|
|
|
|
setupCliTests(context);
|
|
setupDesktopTests(context);
|
|
setupServerTests(context);
|
|
setupServerWebTests(context);
|
|
setupWSLTests(context);
|
|
setupDevTunnelTests(context);
|