From f8e7d27bc966f26b7bae1fac2a0bcceb50852dc3 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Mon, 29 Jun 2020 16:57:14 +0200 Subject: [PATCH 1/2] [code coverage] ingest correct coveredFilePath for mocha --- src/dev/code_coverage/shell_scripts/ingest_coverage.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/dev/code_coverage/shell_scripts/ingest_coverage.sh b/src/dev/code_coverage/shell_scripts/ingest_coverage.sh index b7064a1e42671..2aa8708566ea1 100644 --- a/src/dev/code_coverage/shell_scripts/ingest_coverage.sh +++ b/src/dev/code_coverage/shell_scripts/ingest_coverage.sh @@ -17,7 +17,7 @@ export ES_HOST STATIC_SITE_URL_BASE='https://kibana-coverage.elastic.dev' export STATIC_SITE_URL_BASE -for x in jest functional mocha; do +for x in jest functional; do echo "### Ingesting coverage for ${x}" COVERAGE_SUMMARY_FILE=target/kibana-coverage/${x}-combined/coverage-summary.json @@ -25,5 +25,11 @@ for x in jest functional mocha; do node scripts/ingest_coverage.js --verbose --path ${COVERAGE_SUMMARY_FILE} --vcsInfoPath ./VCS_INFO.txt done +# Need to override COVERAGE_INGESTION_KIBANA_ROOT since mocha json file has original intake worker path +COVERAGE_SUMMARY_FILE=target/kibana-coverage/mocha-combined/coverage-summary.json +COVERAGE_INGESTION_KIBANA_ROOT=/dev/shm/workspace/kibana + +node scripts/ingest_coverage.js --verbose --path ${COVERAGE_SUMMARY_FILE} --vcsInfoPath ./VCS_INFO.txt + echo "### Ingesting Code Coverage - Complete" echo "" From dac1e76ec8519386f1cb2d90a7a23ec46ff00ff5 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Mon, 29 Jun 2020 21:59:27 +0200 Subject: [PATCH 2/2] export variable globally so it is availble in node script --- src/dev/code_coverage/shell_scripts/ingest_coverage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dev/code_coverage/shell_scripts/ingest_coverage.sh b/src/dev/code_coverage/shell_scripts/ingest_coverage.sh index 2aa8708566ea1..2dae75484d68f 100644 --- a/src/dev/code_coverage/shell_scripts/ingest_coverage.sh +++ b/src/dev/code_coverage/shell_scripts/ingest_coverage.sh @@ -27,7 +27,7 @@ done # Need to override COVERAGE_INGESTION_KIBANA_ROOT since mocha json file has original intake worker path COVERAGE_SUMMARY_FILE=target/kibana-coverage/mocha-combined/coverage-summary.json -COVERAGE_INGESTION_KIBANA_ROOT=/dev/shm/workspace/kibana +export COVERAGE_INGESTION_KIBANA_ROOT=/dev/shm/workspace/kibana node scripts/ingest_coverage.js --verbose --path ${COVERAGE_SUMMARY_FILE} --vcsInfoPath ./VCS_INFO.txt