Skip to content

Commit 07d5870

Browse files
committed
Fix flakeguard aggregate cmds
1 parent 4a55ba9 commit 07d5870

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var AggregateAllCmd = &cobra.Command{
2929
}
3030

3131
func init() {
32-
AggregateAllCmd.Flags().String("results-path", "testresult/", "Path to the folder containing JSON test result files")
33-
AggregateAllCmd.Flags().String("output-results", "failed_tests.json", "Path to output the filtered failed test results in JSON format")
34-
AggregateAllCmd.Flags().String("output-logs", "failed_logs.json", "Path to output the filtered failed test logs in JSON format")
32+
AggregateAllCmd.Flags().String("results-path", "", "Path to the folder containing JSON test result files")
33+
AggregateAllCmd.Flags().String("output-results", "./failed_tests.json", "Path to output the filtered failed test results in JSON format")
34+
AggregateAllCmd.Flags().String("output-logs", "", "Path to output the filtered failed test logs in JSON format")
3535
}

tools/flakeguard/cmd/aggregate_failed.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ var AggregateFailedCmd = &cobra.Command{
3939
}
4040

4141
func init() {
42-
AggregateFailedCmd.Flags().String("results-path", "testresult/", "Path to the folder containing JSON test result files")
43-
AggregateFailedCmd.Flags().String("output-results", "failed_tests.json", "Path to output the filtered failed test results in JSON format")
44-
AggregateFailedCmd.Flags().String("output-logs", "failed_logs.json", "Path to output the filtered failed test logs in JSON format")
42+
AggregateFailedCmd.Flags().String("results-path", "", "Path to the folder containing JSON test result files")
43+
AggregateFailedCmd.Flags().String("output-results", "./failed_tests.json", "Path to output the filtered failed test results in JSON format")
44+
AggregateFailedCmd.Flags().String("output-logs", "./failed_logs.json", "Path to output the filtered failed test logs in JSON format")
4545
AggregateFailedCmd.Flags().Float64("threshold", 0.8, "Threshold for considering a test as failed")
4646
AggregateFailedCmd.Flags().Float64("min-pass-ratio", 0.001, "Minimum pass ratio for considering a test as flaky. Used to distinguish between tests that are truly flaky (with inconsistent results) and those that are consistently failing.")
4747
}

tools/flakeguard/reports/reports.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func SaveFilteredResultsAndLogs(outputResultsPath, outputLogsPath string, failed
158158
if err := saveResults(outputResultsPath, failedResults); err != nil {
159159
log.Fatalf("Error writing failed results to file: %v", err)
160160
}
161-
fmt.Printf("Filtered failed test results saved to %s\n", outputResultsPath)
161+
fmt.Printf("Test results saved to %s\n", outputResultsPath)
162162
} else {
163163
fmt.Println("No failed tests found based on the specified threshold and min pass ratio.")
164164
}
@@ -167,7 +167,7 @@ func SaveFilteredResultsAndLogs(outputResultsPath, outputLogsPath string, failed
167167
if err := saveTestOutputs(outputLogsPath, failedResults); err != nil {
168168
log.Fatalf("Error writing failed logs to file: %v", err)
169169
}
170-
fmt.Printf("Filtered failed test logs saved to %s\n", outputLogsPath)
170+
fmt.Printf("Test logs saved to %s\n", outputLogsPath)
171171
}
172172
}
173173

0 commit comments

Comments
 (0)