Skip to content

Commit

Permalink
Fix config
Browse files Browse the repository at this point in the history
  • Loading branch information
fhinkel committed Mar 30, 2020
1 parent 6a4df19 commit 02e85f8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .kokoro/.mocharc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .kokoro/build-with-appengine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/build-with-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 02e85f8

Please sign in to comment.