From 8f897f2457210cd0d158a1cac557468ad7f464e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Louv-Jansen?= Date: Thu, 4 Nov 2021 12:18:19 +0100 Subject: [PATCH] Log command --- x-pack/plugins/apm/scripts/test/api.js | 10 +++++----- x-pack/plugins/apm/scripts/test/e2e.js | 9 ++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/apm/scripts/test/api.js b/x-pack/plugins/apm/scripts/test/api.js index 68e211a530876..1905c8eb7c2dd 100644 --- a/x-pack/plugins/apm/scripts/test/api.js +++ b/x-pack/plugins/apm/scripts/test/api.js @@ -53,9 +53,9 @@ if (server) { ftrScript = 'functional_test_runner'; } -const grepArg = grep ? `--grep ${grep}` : ''; +const grepArg = grep ? `--grep "${grep}"` : ''; +const cmd = `node ../../../../scripts/${ftrScript} ${grepArg} --config ../../../../test/apm_api_integration/${license}/config.ts`; -childProcess.execSync( - `node ../../../../scripts/${ftrScript} ${grepArg} --config ../../../../test/apm_api_integration/${license}/config.ts`, - { cwd: path.join(__dirname), stdio: 'inherit' } -); +console.log(`Running ${cmd}`); + +childProcess.execSync(cmd, { cwd: path.join(__dirname), stdio: 'inherit' }); diff --git a/x-pack/plugins/apm/scripts/test/e2e.js b/x-pack/plugins/apm/scripts/test/e2e.js index 7e13777f42fd6..13055dce2fec5 100644 --- a/x-pack/plugins/apm/scripts/test/e2e.js +++ b/x-pack/plugins/apm/scripts/test/e2e.js @@ -59,10 +59,9 @@ if (server) { } const config = open ? './ftr_config_open.ts' : './ftr_config_run.ts'; -const grepArg = grep ? `--grep ${grep}` : ''; +const grepArg = grep ? `--grep "${grep}"` : ''; const bailArg = bail ? `--bail` : ''; +const cmd = `node ../../../../scripts/${ftrScript} --config ${config} ${grepArg} ${bailArg} --kibana-install-dir '${kibanaInstallDir}'`; -childProcess.execSync( - `node ../../../../scripts/${ftrScript} --config ${config} ${grepArg} ${bailArg} --kibana-install-dir '${kibanaInstallDir}'`, - { cwd: e2eDir, stdio: 'inherit' } -); +console.log(`Running ${cmd}`); +childProcess.execSync(cmd, { cwd: e2eDir, stdio: 'inherit' });