Skip to content

Commit

Permalink
[ci] add urg assertion report detail section in summary report
Browse files Browse the repository at this point in the history
  • Loading branch information
Clo91eaf committed Oct 9, 2024
1 parent 002dcfa commit ee33c7d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions script/ci/src/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,7 @@ object Main:
"## Cycle Update\n"
)

if urgReportFilePath.nonEmpty then
os.write(os.Path(urgReportFilePath.get, os.pwd), "# Coverage report\n")
if urgReportFilePath.nonEmpty then os.write(os.Path(urgReportFilePath.get, os.pwd), "# Coverage report\n")

os.walk(os.pwd / ".github" / caseDir)
.filter(_.last == "default.json")
Expand Down Expand Up @@ -292,12 +291,14 @@ object Main:
Logger.info("Filtering urg report")
val finalMdPath = os.Path(urgReportFilePath.get, os.pwd)
val urgAssertFile = emuResultPath / "urgReport" / "asserts.txt"
val heading = "^Summary for Cover Properties$".r
val summaryHeading = "^Summary for Cover Properties$".r
val detailHeading = "^Detail Report for Cover Properties$".r
val coverSummaryStr =
os.read(urgAssertFile)
.lines()
.dropWhile(!heading.matches(_))
.dropWhile(!summaryHeading.matches(_))
.takeWhile(_.distinct != "-")
.dropWhile(!detailHeading.matches(_))
.toArray
.mkString("\n")
os.write.append(finalMdPath, s"### Coverage for $config \n")
Expand Down

0 comments on commit ee33c7d

Please sign in to comment.