Merge from vscode bead496a613e475819f89f08e9e882b841bc1fe8 (#14883)

* Merge from vscode bead496a613e475819f89f08e9e882b841bc1fe8

* Bump distro

* Upgrade GCC to 4.9 due to yarn install errors

* Update build image

* Fix bootstrap base url

* Bump distro

* Fix build errors

* Update source map file

* Disable checkbox for blocking migration issues (#15131)

* disable checkbox for blocking issues

* wip

* disable checkbox fixes

* fix strings

* Remove duplicate tsec command

* Default to off for tab color if settings not present

* re-skip failing tests

* Fix mocha error

* Bump sqlite version & fix notebooks search view

* Turn off esbuild warnings

* Update esbuild log level

* Fix overflowactionbar tests

* Fix ts-ignore in dropdown tests

* cleanup/fixes

* Fix hygiene

* Bundle in entire zone.js module

* Remove extra constructor param

* bump distro for web compile break

* bump distro for web compile break v2

* Undo log level change

* New distro

* Fix integration test scripts

* remove the "no yarn.lock changes" workflow

* fix scripts v2

* Update unit test scripts

* Ensure ads-kerberos2 updates in .vscodeignore

* Try fix unit tests

* Upload crash reports

* remove nogpu

* always upload crashes

* Use bash script

* Consolidate data/ext dir names

* Create in tmp directory

Co-authored-by: chlafreniere <hichise@gmail.com>
Co-authored-by: Christopher Suh <chsuh@microsoft.com>
Co-authored-by: chgagnon <chgagnon@microsoft.com>
This commit is contained in:
Karl Burtram
2021-04-27 14:01:59 -07:00
committed by GitHub
parent 7e1c0076ba
commit 867a963882
1817 changed files with 81812 additions and 50843 deletions

View File

@@ -3,6 +3,10 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// mocha disables running through electron by default. Note that this must
// come before any mocha imports.
process.env.MOCHA_COLORS = '1';
const { app, BrowserWindow, ipcMain } = require('electron');
const { tmpdir } = require('os');
const { join } = require('path');
@@ -11,13 +15,13 @@ const mocha = require('mocha');
const events = require('events');
const MochaJUnitReporter = require('mocha-junit-reporter');
const url = require('url');
const createStatsCollector = require('mocha/lib/stats-collector');
const FullJsonStreamReporter = require('../fullJsonStreamReporter');
// Disable render process reuse, we still have
// non-context aware native modules in the renderer.
app.allowRendererProcessReuse = false;
const defaultReporterName = process.platform === 'win32' ? 'list' : 'spec';
const optimist = require('optimist')
.describe('grep', 'only run tests matching <pattern>').alias('grep', 'g').alias('grep', 'f').string('grep')
.describe('invert', 'uses the inverse of the match specified by grep').alias('invert', 'i').string('invert')
@@ -26,7 +30,7 @@ const optimist = require('optimist')
.describe('build', 'run with build output (out-build)').boolean('build')
.describe('coverage', 'generate coverage report').boolean('coverage')
.describe('debug', 'open dev tools, keep window open, reuse app data').string('debug')
.describe('reporter', 'the mocha reporter').string('reporter').default('reporter', defaultReporterName)
.describe('reporter', 'the mocha reporter').string('reporter').default('reporter', 'spec')
.describe('reporter-options', 'the mocha reporter options').string('reporter-options').default('reporter-options', '')
.describe('tfs').string('tfs')
.describe('help', 'show the help').alias('help', 'h');
@@ -56,10 +60,10 @@ function deserializeSuite(suite) {
suites: suite.suites,
tests: suite.tests,
title: suite.title,
titlePath: () => suite.titlePath,
fullTitle: () => suite.fullTitle,
timeout: () => suite.timeout,
retries: () => suite.retries,
enableTimeouts: () => suite.enableTimeouts,
slow: () => suite.slow,
bail: () => suite.bail
};
@@ -68,6 +72,7 @@ function deserializeSuite(suite) {
function deserializeRunnable(runnable) {
return {
title: runnable.title,
titlePath: () => runnable.titlePath,
fullTitle: () => runnable.fullTitle,
async: runnable.async,
slow: () => runnable.slow,
@@ -77,6 +82,15 @@ function deserializeRunnable(runnable) {
};
}
function importMochaReporter(name) {
if (name === 'full-json-stream') {
return FullJsonStreamReporter;
}
const reporterPath = path.join(path.dirname(require.resolve('mocha')), 'lib', 'reporters', name);
return require(reporterPath);
}
function deserializeError(err) {
const inspect = err.inspect;
err.inspect = () => inspect;
@@ -147,6 +161,7 @@ app.on('ready', () => {
win.loadURL(url.format({ pathname: path.join(__dirname, 'renderer.html'), protocol: 'file:', slashes: true }));
const runner = new IPCRunner();
createStatsCollector(runner);
if (argv.tfs) {
new mocha.reporters.Spec(runner);
@@ -157,11 +172,19 @@ app.on('ready', () => {
}
});
} else {
const reporterPath = path.join(path.dirname(require.resolve('mocha')), 'lib', 'reporters', argv.reporter);
let Reporter;
// mocha patches symbols to use windows escape codes, but it seems like
// Electron mangles these in its output.
if (process.platform === 'win32') {
Object.assign(importMochaReporter('base').symbols, {
ok: '+',
err: 'X',
dot: '.',
});
}
let Reporter;
try {
Reporter = require(reporterPath);
Reporter = importMochaReporter(argv.reporter);
} catch (err) {
try {
Reporter = require(argv.reporter);