@@ -87,18 +87,6 @@ var AggregateResultsCmd = &cobra.Command{
8787 fmt .Println ("Test results mapped to code owners successfully." )
8888 }
8989
90- // Save the aggregated report to the output directory
91- aggregatedReportPath := filepath .Join (outputDir , "all-test-results.json" )
92- if err := reports .SaveReport (fs , aggregatedReportPath , * aggregatedReport ); err != nil {
93- return fmt .Errorf ("error saving aggregated test report: %w" , err )
94- }
95- fmt .Printf ("Aggregated test report saved to %s\n " , aggregatedReportPath )
96-
97- // Filter failed tests (PassRatio < maxPassRatio and not skipped)
98- s = spinner .New (spinner .CharSets [11 ], 100 * time .Millisecond )
99- s .Suffix = " Filtering failed tests..."
100- s .Start ()
101-
10290 failedTests := reports .FilterTests (aggregatedReport .Results , func (tr reports.TestResult ) bool {
10391 return ! tr .Skipped && tr .PassRatio < maxPassRatio
10492 })
@@ -141,6 +129,19 @@ var AggregateResultsCmd = &cobra.Command{
141129 fmt .Println ("No failed tests found. Skipping generation of failed tests reports." )
142130 }
143131
132+ // Remove logs from test results for the aggregated report
133+ for i := range aggregatedReport .Results {
134+ aggregatedReport .Results [i ].Outputs = nil
135+ aggregatedReport .Results [i ].PackageOutputs = nil
136+ }
137+
138+ // Save the aggregated report to the output directory
139+ aggregatedReportPath := filepath .Join (outputDir , "all-test-results.json" )
140+ if err := reports .SaveReport (fs , aggregatedReportPath , * aggregatedReport ); err != nil {
141+ return fmt .Errorf ("error saving aggregated test report: %w" , err )
142+ }
143+ fmt .Printf ("Aggregated test report saved to %s\n " , aggregatedReportPath )
144+
144145 // Generate all-tests-summary.json
145146 if summaryFileName != "" {
146147 s = spinner .New (spinner .CharSets [11 ], 100 * time .Millisecond )
0 commit comments