On Mon, Aug 31, 2020 at 8:46 PM xiangdong...@gmail.com < xiangdong...@gmail.com> wrote:
> I'm looking for a way to exclude one specific testcase (perhaps multiple > in the future) from 'go test' and wondering how to define a 'negation' > pattern? > > For example, how to run all testcases of misc/cgo/test except for a > specific one, say Test7978? > Knowing why you need to do this might elicit better answers but my recommendation would be to put the test in its own test file and add either a `// +build ignore` comment or use a custom build tag and the `-tags` option to optionally enable it. For example, `go test -tags test7978` and `// +build test7978` at the top of the test file you want run only when explicitly enabled. -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD95tk3o_ohrL9gXHMxJoCbPyBdMZ14w_y8vtm3%3Dhxhhww%40mail.gmail.com.