smoke - enable graceful-fs (#137734)

This commit is contained in:
Benjamin Pasero 2021-11-23 17:29:08 +01:00 committed by GitHub
parent 04b6138b4d
commit 1b40be3377
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -12,7 +12,6 @@ import * as rimraf from 'rimraf';
import { URI } from 'vscode-uri';
import * as kill from 'tree-kill';
import * as optimistLib from 'optimist';
import { StdioOptions } from 'node:child_process';
const optimist = optimistLib
.describe('workspacePath', 'path to the workspace (folder or *.code-workspace file) to open in the test').string('workspacePath')
@ -154,7 +153,7 @@ async function launchServer(browserType: BrowserType): Promise<{ endpoint: url.U
}
}
const stdio: StdioOptions = optimist.argv.debug ? 'pipe' : ['ignore', 'pipe', 'ignore'];
const stdio: cp.StdioOptions = optimist.argv.debug ? 'pipe' : ['ignore', 'pipe', 'ignore'];
let serverProcess = cp.spawn(
serverLocation,

View file

@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as fs from 'fs';
import { gracefulify } from 'graceful-fs';
import * as cp from 'child_process';
import * as path from 'path';
import * as os from 'os';
@ -31,6 +32,12 @@ import { setup as setupTerminalProfileTests } from './areas/terminal/terminal-pr
import { setup as setupTerminalTabsTests } from './areas/terminal/terminal-tabs.test';
import { setup as setupTerminalEditorsTests } from './areas/terminal/terminal-editors.test';
try {
gracefulify(fs);
} catch (error) {
console.error(`Error enabling graceful-fs: ${error}`);
}
const testDataPath = path.join(os.tmpdir(), 'vscsmoke');
if (fs.existsSync(testDataPath)) {
rimraf.sync(testDataPath);