You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -45,10 +46,9 @@ var AggregateResultsCmd = &cobra.Command{
45
46
}
46
47
47
48
funcinit() {
48
-
AggregateResultsCmd.Flags().String("results-path", "", "Path to the folder containing JSON test result files")
49
-
AggregateResultsCmd.Flags().String("output-results", "./results.json", "Path to output the aggregated or filtered test results in JSON format")
50
-
AggregateResultsCmd.Flags().String("output-logs", "", "Path to output the filtered test logs in JSON format")
51
-
AggregateResultsCmd.Flags().Float64("threshold", 1.0, "Minimum pass ratio for considering a test as flaky (used with --filter-failed)")
52
-
AggregateResultsCmd.Flags().Float64("min-pass-ratio", 0.001, "Minimum pass ratio for considering a test as flaky (used with --filter-failed)")
53
-
AggregateResultsCmd.Flags().Bool("filter-failed", false, "If true, filter and output only failed tests based on the threshold")
49
+
AggregateResultsCmd.Flags().StringVarP(&resultsFolderPath, "results-path", "p", "", "Path to the folder containing JSON test result files")
50
+
AggregateResultsCmd.Flags().StringVarP(&outputResultsPath, "output-results", "o", "./results.json", "Path to output the aggregated or filtered test results in JSON format")
51
+
AggregateResultsCmd.Flags().StringVarP(&outputLogsPath, "output-logs", "l", "", "Path to output the filtered test logs in JSON format")
52
+
AggregateResultsCmd.Flags().Float64VarP(&maxPassRatio, "max-pass-ratio", "m", 1.0, "The maximum (non-inclusive) pass ratio threshold for a test to be considered a failure")
53
+
AggregateResultsCmd.Flags().BoolVarP(&filterFailed, "filter-failed", "f", false, "If true, filter and output only failed tests based on the min-pass-ratio threshold")
Copy file name to clipboardExpand all lines: tools/flakeguard/runner/runner_test.go
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -260,9 +260,11 @@ func TestRun(t *testing.T) {
260
260
require.False(t, expected.seen, "test '%s' was seen multiple times", result.TestName)
261
261
expected.seen=true
262
262
263
-
assert.Len(t, result.Durations, result.Runs, "test '%s' has a mismatch of runs and duration counts\nIf this is a panic test, this is expected (but strange and buggy) behavior",
264
-
result.TestName, defaultRuns,
265
-
)
263
+
if!expected.allPanics&&!expected.somePanics { // Panics end up wrecking durations
264
+
assert.Len(t, result.Durations, result.Runs, "test '%s' has a mismatch of runs and duration counts",
0 commit comments