diff --git a/packages/kbn-test/src/functional_tests/run_tests/flags.ts b/packages/kbn-test/src/functional_tests/run_tests/flags.ts index 5d7fffc2a965b..9f91bf2728cbe 100644 --- a/packages/kbn-test/src/functional_tests/run_tests/flags.ts +++ b/packages/kbn-test/src/functional_tests/run_tests/flags.ts @@ -78,12 +78,12 @@ export function parseFlags(flags: FlagsReader) { installDir: flags.path('kibana-install-dir'), grep: flags.string('grep'), suiteTags: { - include: flags.arrayOfStrings('include-tag'), - exclude: flags.arrayOfStrings('exclude-tag'), + include: flags.arrayOfStrings('include-tag') ?? [], + exclude: flags.arrayOfStrings('exclude-tag') ?? [], }, suiteFilters: { - include: flags.arrayOfPaths('include'), - exclude: flags.arrayOfPaths('exclude'), + include: flags.arrayOfPaths('include') ?? [], + exclude: flags.arrayOfPaths('exclude') ?? [], }, }; } diff --git a/packages/kbn-test/src/functional_tests/run_tests/run_tests.ts b/packages/kbn-test/src/functional_tests/run_tests/run_tests.ts index e936264d8bf04..b8edfeadbdf08 100644 --- a/packages/kbn-test/src/functional_tests/run_tests/run_tests.ts +++ b/packages/kbn-test/src/functional_tests/run_tests/run_tests.ts @@ -36,6 +36,27 @@ export async function runTests(log: ToolingLog, options: RunTestsOptions) { log.warning('❗️❗️❗️'); } + const settingOverrides = { + mochaOpts: { + bail: options.bail, + dryRun: options.dryRun, + grep: options.grep, + }, + kbnTestServer: { + installDir: options.installDir, + }, + suiteFiles: { + include: options.suiteFilters.include, + exclude: options.suiteFilters.exclude, + }, + suiteTags: { + include: options.suiteTags.include, + exclude: options.suiteTags.exclude, + }, + updateBaselines: options.updateBaselines, + updateSnapshots: options.updateSnapshots, + }; + for (const [i, path] of options.configs.entries()) { await log.indent(0, async () => { if (options.configs.length > 1) { @@ -43,7 +64,7 @@ export async function runTests(log: ToolingLog, options: RunTestsOptions) { log.write(`--- [${progress}] Running ${Path.relative(REPO_ROOT, path)}`); } - const config = await readConfigFile(log, options.esVersion, path); + const config = await readConfigFile(log, options.esVersion, path, settingOverrides); const hasTests = await checkForEnabledTestsInFtrConfig({ config,