On 3/17/21 2:49 PM, Bryce Torcello wrote:
However it's my understanding that this would match all
"*_test.go" files in these matching paths. Whereas I was hoping to exclude a
single "*_test.go" at a specific path since I don't want to disable all the
other tests.
Unless there is another way, I think that the only way to do what I desire is to include
a patch for the deletion of the "_test.go" files I require. At least until
something like
https://github.com/golang/go/issues/41583 is implemented (and I assume
`%gocheck` could make use of).
I use one of the following to disable one specific test (not the file, just specific
tests).
If tests use standard "testing" module:
```
for test in "TestRestart" \
"TestStop" \
"TestActive" \
; do
awk -i inplace '/^func.*'"$test"'\(/ { print; print
"\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test)
done
```
If not:
```
for test in "TestRestart" \
"TestStop" \
"TestActive" \
; do
awk -i inplace '/^func.*'"$test"'/ { print; print
"\treturn"; next}1' $(grep -rl $test)
done
```