Hi Kurtis, Thanks for replying, background is the github issue 39466 <https://github.com/golang/go/issues/39466>and its potential fix <https://go-review.googlesource.com/c/go/+/237858>under reviewing, we are trying not to introduce any additional test files and tags but seeking for a change to test command line only, other opinions are welcome.
On Tuesday, September 1, 2020 at 11:56:16 AM UTC+8 Kurtis Rader wrote: > On Mon, Aug 31, 2020 at 8:46 PM xiangd...@gmail.com <xiangd...@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/f689065e-20fe-4147-ae24-ea97c62b9708n%40googlegroups.com.