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
RunTestsCmd.Flags().StringP("project-path", "r", ".", "The path to the Go project. Default is the current directory. Useful for subprojects")
88
97
RunTestsCmd.Flags().String("test-packages-json", "", "JSON-encoded string of test packages")
89
98
RunTestsCmd.Flags().StringSlice("test-packages", nil, "Comma-separated list of test packages to run")
99
+
RunTestsCmd.Flags().Bool("run-all-packages", false, "Run all test packages in the project. This flag overrides --test-packages and --test-packages-json")
90
100
RunTestsCmd.Flags().IntP("run-count", "c", 1, "Number of times to run the tests")
91
101
RunTestsCmd.Flags().Bool("race", false, "Enable the race detector")
92
102
RunTestsCmd.Flags().Bool("fail-fast", false, "Stop on the first test failure")
93
103
RunTestsCmd.Flags().String("output-json", "", "Path to output the test results in JSON format")
94
104
RunTestsCmd.Flags().Float64("threshold", 0.8, "Threshold for considering a test as flaky")
95
105
RunTestsCmd.Flags().StringSlice("skip-tests", nil, "Comma-separated list of test names to skip from running")
106
+
RunTestsCmd.Flags().Bool("print-failed-tests", true, "Print failed test results to the console")
107
+
}
108
+
109
+
funccheckDependencies(projectPathstring) error {
110
+
cmd:=exec.Command("go", "mod", "tidy")
111
+
cmd.Dir=projectPath
112
+
113
+
varout bytes.Buffer
114
+
cmd.Stdout=&out
115
+
cmd.Stderr=&out
116
+
117
+
iferr:=cmd.Run(); err!=nil {
118
+
returnfmt.Errorf("dependency check failed: %v\n%s\nPlease run 'go mod tidy' to fix missing or unused dependencies", err, out.String())
0 commit comments