From 02e85f819f8e17004bfbbd2daa0bf38b9641654d Mon Sep 17 00:00:00 2001 From: Franziska Hinkelmann Date: Mon, 30 Mar 2020 14:49:40 -0400 Subject: [PATCH] Fix config --- .kokoro/.mocharc.js | 7 +++++-- .kokoro/build-with-appengine.sh | 2 +- .kokoro/build-with-run.sh | 2 +- .kokoro/build.sh | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.kokoro/.mocharc.js b/.kokoro/.mocharc.js index 55527ae4d1..41f5ab5763 100644 --- a/.kokoro/.mocharc.js +++ b/.kokoro/.mocharc.js @@ -19,11 +19,14 @@ if (process.env.MOCHA_THROW_DEPRECATION === 'false') { if (process.env.MOCHA_REPORTER) { config.reporter = process.env.MOCHA_REPORTER; } + +const reporterOptions = []; if (process.env.MOCHA_REPORTER_OUTPUT) { - config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; + reporterOptions.push(`output=${process.env.MOCHA_REPORTER_OUTPUT}`); } if (process.env.MOCHA_REPORTER_SUITENAME) { - config['reporter-option'] = `suiteName=${process.env.MOCHA_REPORTER_SUITENAME}`; + reporterOptions.push(`suiteName=${process.env.MOCHA_REPORTER_SUITENAME}`); } +config['reporter-option'] = reporterOptions; module.exports = config \ No newline at end of file diff --git a/.kokoro/build-with-appengine.sh b/.kokoro/build-with-appengine.sh index 90c6559608..cef93d1ad4 100755 --- a/.kokoro/build-with-appengine.sh +++ b/.kokoro/build-with-appengine.sh @@ -67,7 +67,7 @@ npm install # If tests are running against master, configure Build Cop # to open issues on failures: -if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"release"* ]]; then +if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"presubmit"* ]]; then export MOCHA_REPORTER_SUITENAME=${PROJECT} cleanup() { chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop diff --git a/.kokoro/build-with-run.sh b/.kokoro/build-with-run.sh index 0e92d53179..6365c39489 100755 --- a/.kokoro/build-with-run.sh +++ b/.kokoro/build-with-run.sh @@ -63,7 +63,7 @@ npm install # If tests are running against master, configure Build Cop # to open issues on failures: -if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"release"* ]]; then +if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"presubmit"* ]]; then export MOCHA_REPORTER_SUITENAME=${PROJECT} cleanup() { chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 48aec83498..15169f413b 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -90,7 +90,7 @@ gcloud config set project $GCLOUD_PROJECT # If tests are running against master, configure Build Cop # to open issues on failures: -if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"release"* ]]; then +if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"presubmit"* ]]; then export MOCHA_REPORTER_SUITENAME=${PROJECT} cleanup() { chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop