Skip to content

Commit 1b1d87d

Browse files
committed
Testset for, fix
1 parent 7d8c9d0 commit 1b1d87d

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

src/execution/testset.jl

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,32 @@ function Test.get_test_counts(ts::PerfTestSet)
113113
return passes, fails, errors, broken, c_passes, c_fails, c_errors, c_broken, duration
114114
end
115115

116+
function get_test_counts(tss::Vector{Any})
117+
118+
passes, fails, errors, broken = 0, 0, 0, 0
119+
c_passes, c_fails, c_errors, c_broken = 0, 0, 0, 0
120+
121+
for ts in tss
122+
for t in ts.results
123+
isa(t, Pass) && (passes += 1)
124+
isa(t, Fail) && (fails += 1)
125+
isa(t, Error) && (errors += 1)
126+
isa(t, Broken) && (broken += 1)
127+
if isa(t, AbstractTestSet)
128+
np, nf, ne, nb, ncp, ncf, nce, ncb, duration = get_test_counts(t)
129+
c_passes += np + ncp
130+
c_fails += nf + ncf
131+
c_errors += ne + nce
132+
c_broken += nb + ncb
133+
end
134+
end
135+
end
136+
137+
# We dont use this but we leave the field for compatibility with other types of TestSet
138+
duration = ""
139+
return passes, fails, errors, broken, c_passes, c_fails, c_errors, c_broken, duration
140+
end
141+
116142
function get_test_errors(ts::PerfTestSet)
117143
errors = Error[]
118144
for t in ts.results

src/transform/suffix.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ function perftestsuffix(context :: Context)
171171
if TS isa Vector
172172
benchmarks = PerfTest.newBenchmarkGroup()
173173
for ts in TS
174-
testresdict[ts.description * ts.iterator] = extractTestResults(TS)
175-
benchmarks[ts.description * ts.iterator] = ts.benchmarks
174+
testresdict[ts.description * "_" * string(ts.iterator)] = extractTestResults(TS)
175+
benchmarks[ts.description * "_" *string(ts.iterator)] = ts.benchmarks
176176
end
177177
# Save new results
178178
newres = Suite_Execution_Result(

0 commit comments

Comments
 (0)