fix(testrunner): fix windows bots (#3660)

This commit is contained in:
Pavel Feldman 2020-08-27 10:14:27 -07:00 committed by GitHub
parent efd45f8b51
commit 2b7d79d7fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,6 @@
import * as debug from 'debug';
import * as fs from 'fs';
import * as path from 'path';
const debugLoggerColorMap = {
'api': 45, // cyan
@ -34,7 +33,6 @@ class DebugLogger {
constructor() {
if (process.env.DEBUG_FILE) {
fs.mkdirSync(path.dirname(process.env.DEBUG_FILE), { recursive: true });
const ansiRegex = new RegExp([
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'

View File

@ -64,6 +64,10 @@ export function registerWorkerFixture<T extends keyof(WorkerState & FixtureParam
type RunResult = 'passed' | 'failed' | 'forbid-only' | 'no-tests';
export async function run(config: RunnerConfig, files: string[], reporter: Reporter): Promise<RunResult> {
if (!config.trialRun) {
await removeFolderAsync(config.outputDir).catch(e => {});
fs.mkdirSync(config.outputDir, { recursive: true });
}
const revertBabelRequire = installTransform();
let hasSetup = false;
try {
@ -93,8 +97,6 @@ export async function run(config: RunnerConfig, files: string[], reporter: Repor
// Trial run does not need many workers, use one.
const jobs = (config.trialRun || config.debug) ? 1 : config.jobs;
const runner = new Runner(suite, { ...config, jobs }, reporter);
await removeFolderAsync(config.outputDir).catch(e => {});
fs.mkdirSync(config.outputDir, { recursive: true });
try {
for (const f of beforeFunctions)
await f();