File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ if !os.isDir(rootPath) then {
62
62
val reports : Seq [os.Path ] = findFiles(Seq (rootPath))
63
63
println(s " Found ${reports.length} mill json reports: " )
64
64
println(reports.mkString(" \n " ))
65
+ if reports.isEmpty then {
66
+ println(" Error: no reports found!" )
67
+ System .exit(1 )
68
+ }
65
69
println(" Reading reports..." )
66
70
val tests : Seq [Test ] = reports.map(x => ujson.read(x.toNIO)).flatMap { json =>
67
71
json(1 ).value.asInstanceOf [ArrayBuffer [ujson.Obj ]].map { test =>
@@ -87,6 +91,10 @@ val tests: Seq[Test] = reports.map(x => ujson.read(x.toNIO)).flatMap { json =>
87
91
}
88
92
}
89
93
println(s " Found ${tests.length} tests. " )
94
+ if tests.isEmpty then {
95
+ println(" Error: no tests found!" )
96
+ System .exit(1 )
97
+ }
90
98
println(" Generating JUnit XML report..." )
91
99
val suites = tests.groupBy(_.fullyQualifiedName).map { case (suit, tests) =>
92
100
val testcases = tests.map { test =>
You can’t perform that action at this time.
0 commit comments