From 9b80589e970769b0d7b0824f0ed87c7b2bbe2981 Mon Sep 17 00:00:00 2001 From: Christopher Dwyer-Perkins Date: Mon, 13 Jan 2025 15:40:24 -0400 Subject: [PATCH] Added a log that will always fire after test reporters --- bsc-plugin/src/cli.ts | 8 +++++--- framework/src/source/TestRunner.bs | 7 +++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/bsc-plugin/src/cli.ts b/bsc-plugin/src/cli.ts index ce3bbc69..38bd8c91 100644 --- a/bsc-plugin/src/cli.ts +++ b/bsc-plugin/src/cli.ts @@ -65,8 +65,8 @@ async function main() { await telnet.activate(); await telnet.connect(); - const failRegex = /RESULT: Fail/g; - const endRegex = /\[END TEST REPORT\]/g; + const failRegex = /\[Rooibos Result\]: (FAIL|PASS)/g; + const endRegex = /\[Rooibos Shutdown\]/g; async function doExit(emitAppExit = false) { if (emitAppExit) { @@ -82,7 +82,9 @@ async function main() { //check for Fails or Crashes let failMatches = failRegex.exec(output); if (failMatches && failMatches.length > 0) { - currentErrorCode = 1; + if (failMatches[1] === 'FAIL') { + currentErrorCode = 1; + } } let endMatches = endRegex.exec(output); diff --git a/framework/src/source/TestRunner.bs b/framework/src/source/TestRunner.bs index a02139c9..754847a3 100644 --- a/framework/src/source/TestRunner.bs +++ b/framework/src/source/TestRunner.bs @@ -128,6 +128,13 @@ namespace rooibos else rooibos.common.logDebug("rooibos.Coverage.reportCodeCoverage is not a function") end if + + ' Final results to be logged after all test reporters have finished + resultStatus = "PASS" + if isFailed then resultStatus = "FAIL" + print "[Rooibos Result]: " + resultStatus + print "[Rooibos Shutdown]" + if m.config.sendHomeOnFinish <> false m.sendHomeKeypress() end if