Skip to content

Commit 9fe5042

Browse files
update metadata, fix show failed tests only bug
(cherry picked from commit c1dd134394ff3f950ce97ed4ccd363e584e13c54)
1 parent afb22f8 commit 9fe5042

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

UnityPerformanceBenchmarkReporter/Report/ReportWriter.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,18 @@ private void WriteShowFailedTestsCheckbox(StreamWriter streamWriter)
206206
if (thisHasBenchmarkResults)
207207
{
208208
streamWriter.WriteLine("<label id=\"hidefailed\" class=\"containerLabel\">Show failed tests only");
209-
streamWriter.WriteLine("<input type=\"checkbox\" onclick=\"toggleCanvasWithNoFailures()\" checked>");
209+
210+
//var regressed = perfTestRunResults.SelectMany(ptr => ptr.TestResults).SelectMany(t => t.SampleGroupResults).Any(a => a.Regressed);
211+
212+
if (perfTestRunResults.SelectMany(ptr => ptr.TestResults).SelectMany(t => t.SampleGroupResults).Any(a => a.Regressed))
213+
{
214+
streamWriter.WriteLine("<input type=\"checkbox\" onclick=\"toggleCanvasWithNoFailures()\" checked>");
215+
}
216+
else
217+
{
218+
streamWriter.WriteLine("<input type=\"checkbox\" onclick=\"toggleCanvasWithNoFailures()\">");
219+
}
220+
210221
}
211222
else
212223
{

UnityPerformanceBenchmarkReporter/TestRunMetadataProcessor.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,24 @@ public class ExtractField
234234
ExtractedFieldName = "PerfTestsRevision",
235235
ExtractionRegex = new Regex("PerfTestsRevision\\|([^|]*)",
236236
RegexOptions.Compiled | RegexOptions.IgnoreCase)
237+
},
238+
new ExtractField
239+
{
240+
ExtractedFieldName = "AndroidTargetArchitecture",
241+
ExtractionRegex = new Regex("AndroidTargetArchitecture\\|([^|]*)",
242+
RegexOptions.Compiled | RegexOptions.IgnoreCase)
243+
},
244+
new ExtractField
245+
{
246+
ExtractedFieldName = "UrpVersion",
247+
ExtractionRegex = new Regex("UrpVersion\\|([^|]*)",
248+
RegexOptions.Compiled | RegexOptions.IgnoreCase)
249+
},
250+
new ExtractField
251+
{
252+
ExtractedFieldName = "UrpRevision",
253+
ExtractionRegex = new Regex("UrpRevision\\|([^|]*)",
254+
RegexOptions.Compiled | RegexOptions.IgnoreCase)
237255
}
238256
}
239257
}

0 commit comments

Comments
 (0)