Skip to content

Commit

Permalink
[ci] add detail error detection
Browse files Browse the repository at this point in the history
Signed-off-by: Avimitin <[email protected]>
  • Loading branch information
Avimitin committed May 25, 2024
1 parent 3cb334f commit 7e15390
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions script/src/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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")
Expand Down

0 comments on commit 7e15390

Please sign in to comment.