summaryrefslogtreecommitdiff
path: root/test/errchk
Commit message (Collapse)AuthorAgeFilesLines
* test/errchk: use "#!/usr/bin/env perl" shebang lineShenghou Ma2013-05-231-1/+1
| | | | | | | | fix test failure of go.tools sub-repo on NetBSD. R=golang-dev, bradfitz CC=golang-dev https://codereview.appspot.com/9662044
* cmd/vet: add assembly checkerRuss Cox2013-03-221-1/+1
| | | | | | | | Fixes issue 5036. R=golang-dev, r CC=golang-dev https://codereview.appspot.com/7531045
* errchk: allow multiple patternsRuss Cox2011-08-161-22/+27
| | | | | | | | | | | | | | | | | | | | | | | | // ERROR "pattern1" "pattern2" means that there has to be one or more lines matching pattern1 and then excluding those, there have to be one or more lines matching pattern2. So if you expect two different error messages from a particular line, writing two separate patterns checks that both errors are produced. Also, errchk now flags lines that produce more errors than expected. Before, as long as at least one error matched the pattern, all the others were ignored. Revise tests to expect or silence these additional errors. R=lvd, r, iant CC=golang-dev http://codereview.appspot.com/4869044
* errchk: add -0 flagRuss Cox2011-08-021-1/+14
| | | | | | R=lvd CC=golang-dev http://codereview.appspot.com/4837049
* test: test of goto restrictionsRuss Cox2011-06-201-0/+16
| | | | | | R=gri, iant, bradfitz, fvbommel, r CC=golang-dev http://codereview.appspot.com/4652041
* replace non-blocking send, receive syntax with selectRuss Cox2011-01-311-0/+1
| | | | | | R=golang-dev, nigeltao, niemeyer, r CC=golang-dev http://codereview.appspot.com/4079053
* errchk: accept multiple source filesEoghan Sherry2010-12-071-41/+59
| | | | | | | | R=rsc, iant CC=golang-dev http://codereview.appspot.com/3217042 Committer: Russ Cox <rsc@golang.org>
* fix buildRobert Griesemer2010-09-151-2/+2
| | | | | | R=iant CC=golang-dev, ken2 http://codereview.appspot.com/2182043
* test: gccgo and gc print the error on different lines.Ian Lance Taylor2010-08-311-2/+2
| | | | | | | | | | | | | | | | | This introduces GC_ERROR to mark an error only issued by the gc compiler. GCCGO_ERROR already exists to mark errors only issued by the gccgo compiler. Obviously these should be used sparingly. bug195.go:9: error: interface contains embedded non-interface bug195.go:12: error: interface contains embedded non-interface bug195.go:15: error: interface contains embedded non-interface bug195.go:18: error: invalid recursive interface bug195.go:22: error: invalid recursive interface R=rsc CC=golang-dev http://codereview.appspot.com/2040043
* errchk: fix build - allow matches in multiline error messagesRuss Cox2010-06-201-1/+6
| | | | | | TBR=r CC=golang-dev http://codereview.appspot.com/1734042
* handle compiler crash better:Russ Cox2009-10-091-1/+2
| | | | | | | | | | need to use exec to avoid seeing shell output about the crash. R=iant DELTA=2 (1 added, 0 deleted, 1 changed) OCL=35542 CL=35560
* rewrite errchk in perl for speed (compared to bash)Russ Cox2009-10-091-64/+62
| | | | | | | R=iant DELTA=125 (51 added, 53 deleted, 21 changed) OCL=35508 CL=35511
* If the compiler dumps core, bash will print a useless errorIan Lance Taylor2009-08-211-3/+13
| | | | | | | | | | | | | | message with the full path of the errchk script. Catch that by wrapping the if statement which invokes the compiler in a subshell. Use the $TMPOUT file as a flag to let the main shell know whether the subshell ran. Since the compiler stdout and stderr are redirected, if the if statement produces any output, then the compiler crashed, and we report that. R=r,rsc DELTA=14 (11 added, 1 deleted, 2 changed) OCL=33690 CL=33692
* use errchk in more places.Russ Cox2009-07-301-11/+4
| | | | | | | | | | let errchk exit 0 even if it has reported a BUG. it echoed BUG and that's all that matters. R=r DELTA=143 (1 added, 89 deleted, 53 changed) OCL=32533 CL=32542
* do not echo command in errchk,Russ Cox2009-07-211-1/+1
| | | | | | | | | | | so that golden.out does not include the name of the compiler (which is arch-specific and shows up in diffs). R=r,iant DELTA=3 (0 added, 0 deleted, 3 changed) OCL=31980 CL=31983
* make 6g constants behave as ken proposes. (i hope.)Russ Cox2009-03-121-2/+2
| | | | | | | | | | various bug fixes and tests involving constants. test/const1.go is the major new test case. R=ken OCL=26216 CL=26224
* make sure errchk only prints BUG once.Russ Cox2008-10-301-5/+6
| | | | | | | | | | using a variable is not sufficient, because sometimes bug() is called from a subshell. R=iant DELTA=7 (2 added, 1 deleted, 4 changed) OCL=18092 CL=18145
* make sure errchk only says BUG once,Russ Cox2008-10-171-3/+15
| | | | | | | | | so that run's count is correct R=iant,r DELTA=20 (12 added, 0 deleted, 8 changed) OCL=17329 CL=17342
* diagnose various conversion problemsRuss Cox2008-10-161-1/+1
| | | | | | R=ken OCL=17320 CL=17320
* 6g currently accepts setting a string value to an integerIan Lance Taylor2008-09-251-4/+4
| | | | | | | | | | | | | | constant without an explicit conversion. I think that is a bug. This adds a test case for it. Also, change errchk to include the string BUG in error messages, so that failures are included in the count reported by the run shell script. R=r,ken DELTA=11 (7 added, 0 deleted, 4 changed) OCL=15857 CL=15880
* Check for specific error messages in the testsuite. ThisIan Lance Taylor2008-09-191-0/+74
permits testing that the compiler emits error messages for specific lines that match egrep regexps. The desired error messages are expressed using comments of the form // ERROR "regexp" R=r DELTA=90 (73 added, 8 deleted, 9 changed) OCL=15513 CL=15566