diff --git a/script/src/Main.scala b/script/src/Main.scala index 13c0a45ff..a1daf7cc2 100644 --- a/script/src/Main.scala +++ b/script/src/Main.scala @@ -563,6 +563,7 @@ object Main: err => val outDir = testRunDir / config / caseName Logger.error(s"Test case $testName failed") + Logger.error(s"Detail error: $err") allFailedTest :+ testName os.write.over( @@ -576,8 +577,11 @@ object Main: os.write.over(actualResultDir / "failed-tests.md", listOfFailJobs) val failedJobsWithError = failed .map(testName => - s"* $testName\n >>> ERROR SUMMARY <<<\n${os - .read(actualResultDir / "failed-logs" / s"${testName.replaceAll(",", "-")}.txt")}" + val failLogPath = actualResultDir / "failed-logs" / s"${testName.replaceAll(",", "-")}.txt" + if os.exists(failLogPath) then + s"* $testName\n >>> ERROR SUMMARY <<<\n${os.read(failLogPath)}" + else + s"* $testName\nNo error log found, error may not been caught in previous steps" ) .appended("") .mkString("\n")