From 9fd19afe6dea3f99b4a0a6a05b245e1d053741a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ey=C3=BE=C3=B3r=20Magn=C3=BAsson?= Date: Thu, 13 May 2021 18:40:07 +0200 Subject: [PATCH] improvement(exec): show test and task logs when log level is verbose --- core/src/plugins/exec.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/core/src/plugins/exec.ts b/core/src/plugins/exec.ts index 74acfa6112..46e38fe9bb 100644 --- a/core/src/plugins/exec.ts +++ b/core/src/plugins/exec.ts @@ -271,6 +271,12 @@ export async function testExecModule({ await copyArtifacts(log, test.config.spec.artifacts, module.buildPath, artifactsPath) + const outputLog = (result.stdout + result.stderr).trim() + if (outputLog) { + const prefix = `Finished running test ${chalk.white(test.name)}. Here is the output:` + log.verbose(renderMessageWithDivider(prefix, outputLog, false, chalk.gray)) + } + return { moduleName: module.name, command, @@ -279,7 +285,7 @@ export async function testExecModule({ success: result.exitCode === 0, startedAt, completedAt: new Date(), - log: result.stdout + result.stderr, + log: outputLog, } } @@ -313,6 +319,11 @@ export async function runExecTask(params: RunTaskParams): Promise