diff --git a/tools/flakeguard/cmd/aggregate.go b/tools/flakeguard/cmd/aggregate_all.go similarity index 69% rename from tools/flakeguard/cmd/aggregate.go rename to tools/flakeguard/cmd/aggregate_all.go index 7b8bc8395..040d62601 100644 --- a/tools/flakeguard/cmd/aggregate.go +++ b/tools/flakeguard/cmd/aggregate_all.go @@ -29,7 +29,7 @@ var AggregateAllCmd = &cobra.Command{ } func init() { - AggregateAllCmd.Flags().String("results-path", "testresult/", "Path to the folder containing JSON test result files") - AggregateAllCmd.Flags().String("output-results", "failed_tests.json", "Path to output the filtered failed test results in JSON format") - AggregateAllCmd.Flags().String("output-logs", "failed_logs.json", "Path to output the filtered failed test logs in JSON format") + AggregateAllCmd.Flags().String("results-path", "", "Path to the folder containing JSON test result files") + AggregateAllCmd.Flags().String("output-results", "./failed_tests.json", "Path to output the filtered failed test results in JSON format") + AggregateAllCmd.Flags().String("output-logs", "", "Path to output the filtered failed test logs in JSON format") } diff --git a/tools/flakeguard/cmd/aggregate_failed.go b/tools/flakeguard/cmd/aggregate_failed.go index 5d04b20dd..b53886206 100644 --- a/tools/flakeguard/cmd/aggregate_failed.go +++ b/tools/flakeguard/cmd/aggregate_failed.go @@ -39,9 +39,9 @@ var AggregateFailedCmd = &cobra.Command{ } func init() { - AggregateFailedCmd.Flags().String("results-path", "testresult/", "Path to the folder containing JSON test result files") - AggregateFailedCmd.Flags().String("output-results", "failed_tests.json", "Path to output the filtered failed test results in JSON format") - AggregateFailedCmd.Flags().String("output-logs", "failed_logs.json", "Path to output the filtered failed test logs in JSON format") + AggregateFailedCmd.Flags().String("results-path", "", "Path to the folder containing JSON test result files") + AggregateFailedCmd.Flags().String("output-results", "./failed_tests.json", "Path to output the filtered failed test results in JSON format") + AggregateFailedCmd.Flags().String("output-logs", "./failed_logs.json", "Path to output the filtered failed test logs in JSON format") AggregateFailedCmd.Flags().Float64("threshold", 0.8, "Threshold for considering a test as failed") 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.") } diff --git a/tools/flakeguard/reports/reports.go b/tools/flakeguard/reports/reports.go index 275bd55a9..b70cd4acd 100644 --- a/tools/flakeguard/reports/reports.go +++ b/tools/flakeguard/reports/reports.go @@ -158,7 +158,7 @@ func SaveFilteredResultsAndLogs(outputResultsPath, outputLogsPath string, failed if err := saveResults(outputResultsPath, failedResults); err != nil { log.Fatalf("Error writing failed results to file: %v", err) } - fmt.Printf("Filtered failed test results saved to %s\n", outputResultsPath) + fmt.Printf("Test results saved to %s\n", outputResultsPath) } else { fmt.Println("No failed tests found based on the specified threshold and min pass ratio.") } @@ -167,7 +167,7 @@ func SaveFilteredResultsAndLogs(outputResultsPath, outputLogsPath string, failed if err := saveTestOutputs(outputLogsPath, failedResults); err != nil { log.Fatalf("Error writing failed logs to file: %v", err) } - fmt.Printf("Filtered failed test logs saved to %s\n", outputLogsPath) + fmt.Printf("Test logs saved to %s\n", outputLogsPath) } }