mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(testrunner): fix windows bots (#3660)
This commit is contained in:
parent
efd45f8b51
commit
2b7d79d7fa
@ -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=><~]))'
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user