]> Cypherpunks repositories - gostls13.git/commit
test: add -update_errors flag to run script
authorDmitry Vyukov <dvyukov@google.com>
Thu, 19 Feb 2015 19:00:11 +0000 (22:00 +0300)
committerDmitry Vyukov <dvyukov@google.com>
Fri, 10 Apr 2015 11:33:42 +0000 (11:33 +0000)
commit7647741246691a17f17799ae1f4c54a9828b90e4
tree65b18fa0dbd0303b1751bf12418c03108bf17d61
parenta5dec3859a8b5fa674c48b7e7099c53a3461bb6d
test: add -update_errors flag to run script

The flag updates error annotations in test files from actual compiler output.
This is useful when doing compiler changes that add/remove/change lots of errors,
or when adding lots of new tests.
Also I noticed at least 2 cases where annotation were sub-optimal:
1. The annotation was "leaking param p" when the actual error is
"leaking param p to result ~r1".
2. The annotation was "leaking param m" when the actual errors
are "leaking param m" and "leaking param mv1".

For now it works only for errorcheck mode.

Also, apply the update to escape and liveness tests.
Some files have gccgo-specific errors of the form "gc error|gccgo error",
so it is risky to run update on all files. Gccgo-specific error
does not necessary contain '|', it can be just truncated.

Change-Id: Iaaae767f859dcb8321a8cb4970b2b70969e8a345
Reviewed-on: https://go-review.googlesource.com/5310
Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
test/escape2.go
test/escape2n.go
test/live.go
test/run.go