From 66b378d654f6836ca3ae05867452741f6e84f405 Mon Sep 17 00:00:00 2001 From: Daylon Wilkins Date: Tue, 5 Nov 2024 05:08:49 -0800 Subject: [PATCH] Fixed Regressions and Progressions mixing --- testing/go/regression/tool/main.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/testing/go/regression/tool/main.go b/testing/go/regression/tool/main.go index 5847bf53d6..6d1b855832 100644 --- a/testing/go/regression/tool/main.go +++ b/testing/go/regression/tool/main.go @@ -90,15 +90,14 @@ func main() { (float64(fromFail)/float64(fromTotal))*100.0, (float64(toFail)/float64(toTotal))*100.0)) if len(trackersFrom) == len(trackersTo) { + // Handle regressions (which we'll display first) foundAnyFailDiff := false - foundAnySuccessDiff := false for trackerIdx := range trackersFrom { // They're sorted, so this should always hold true. // This will really only fail if the tests were updated. if trackersFrom[trackerIdx].File != trackersTo[trackerIdx].File { continue } - // Handle regressions (which we'll display first) foundFileDiff := false fromFailItems := make(map[string]struct{}) for _, trackerFromItem := range trackersFrom[trackerIdx].FailPartialItems { @@ -127,8 +126,16 @@ func main() { sb.WriteString("```\n") } } - // Handle progressions (which we'll display second) - foundFileDiff = false + } + // Handle progressions (which we'll display second) + foundAnySuccessDiff := false + for trackerIdx := range trackersFrom { + // They're sorted, so this should always hold true. + // This will really only fail if the tests were updated. + if trackersFrom[trackerIdx].File != trackersTo[trackerIdx].File { + continue + } + foundFileDiff := false fromSuccessItems := make(map[string]struct{}) for _, trackerFromItem := range trackersFrom[trackerIdx].SuccessItems { fromSuccessItems[trackerFromItem.Query] = struct{}{}