test: fix tests which include special signal handling (#9433)
This commit is contained in:
parent
f0ff2a23d2
commit
76142a33ae
|
|
@ -90,6 +90,8 @@ async function writeFiles(testInfo: TestInfo, files: Files) {
|
||||||
return baseDir;
|
return baseDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const cliEntrypoint = path.join(__dirname, '../../packages/playwright-core/cli.js');
|
||||||
|
|
||||||
async function runPlaywrightTest(childProcess: CommonFixtures['childProcess'], baseDir: string, params: any, env: Env, options: RunOptions): Promise<RunResult> {
|
async function runPlaywrightTest(childProcess: CommonFixtures['childProcess'], baseDir: string, params: any, env: Env, options: RunOptions): Promise<RunResult> {
|
||||||
const paramList = [];
|
const paramList = [];
|
||||||
for (const key of Object.keys(params)) {
|
for (const key of Object.keys(params)) {
|
||||||
|
|
@ -100,7 +102,7 @@ async function runPlaywrightTest(childProcess: CommonFixtures['childProcess'], b
|
||||||
}
|
}
|
||||||
const outputDir = path.join(baseDir, 'test-results');
|
const outputDir = path.join(baseDir, 'test-results');
|
||||||
const reportFile = path.join(outputDir, 'report.json');
|
const reportFile = path.join(outputDir, 'report.json');
|
||||||
const args = ['npx', 'playwright', 'test'];
|
const args = ['node', cliEntrypoint, 'test'];
|
||||||
if (!options.usesCustomOutputDir)
|
if (!options.usesCustomOutputDir)
|
||||||
args.push('--output=' + outputDir);
|
args.push('--output=' + outputDir);
|
||||||
args.push(
|
args.push(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue