1
0
mirror of https://github.com/golang/go synced 2024-11-12 00:20:22 -07:00
go/test
Daniel Morsing ebb0e5db75 test: Add rundir, rundircmpout and errorcheckdir commands to testlib and run.go
rundir will compile each file in the directory in lexicographic order, link the last file as the main package and run the resulting program. rundircmpout is an related command, that will compare the output of the program to an corresponding .out file

errorcheckdir will compile each file in a directory in lexicographic order, running errorcheck on each file as it compiles. All compilations are assumed to be successful except for the last file. However, If a -0 flag is present on the command, the last compilation will also be assumed successful

This CL also includes a small refactoring of run.go. It was getting unwieldy and the meaning of the run commands was hidden behind argument line formatting.

Fixes #4058.

R=rsc, minux.ma, remyoudompheng, iant
CC=golang-dev
https://golang.org/cl/6554071
2012-10-06 09:23:31 +02:00
..
bench test/bench/shootout: new data after 64-bit ints for amd64 2012-09-25 14:14:26 +10:00
bugs test: expand run.go's errorcheck, make clear which bugs run 2012-09-23 13:16:14 -04:00
chan test: use testlib in a few more cases (part 2) 2012-04-20 23:45:43 +08:00
dwarf test: expand run.go's errorcheck, make clear which bugs run 2012-09-23 13:16:14 -04:00
fixedbugs test/fixedbugs: forgotten test cases for issues 3907 and 4156. 2012-09-30 10:35:09 +02:00
interface test: expand run.go's errorcheck, make clear which bugs run 2012-09-23 13:16:14 -04:00
ken go/test/chan1.go: fix typo 2012-02-25 08:47:04 +11:00
safe cmd/gc: suspend safemode during typecheck of inlined bodies. 2012-02-10 22:50:55 +01:00
syntax gc: improve error message for composite literals with unexpected newlines 2012-04-02 11:00:55 -04:00
64bit.go test: use testlib in a few more cases (part 2) 2012-04-20 23:45:43 +08:00
235.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
alias1.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
alias.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
append.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
args.go test: expand run.go's errorcheck, make clear which bugs run 2012-09-23 13:16:14 -04:00
assign1.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
assign.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
bigalg.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
bigmap.go runtime: handle and test large map values 2012-05-24 22:41:07 -04:00
blank1.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
blank.go test: add some tests of valid code that failed with gccgo 2012-03-30 08:42:21 -07:00
bom.go gc: initial BOM is legal. 2012-09-10 13:03:07 -07:00
bombad.go gc: initial BOM is legal. 2012-09-10 13:03:07 -07:00
bounds.go test: prepare for 64-bit ints 2012-09-24 00:06:41 -04:00
chancap.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
char_lit1.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
char_lit.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
closedchan.go test: use testlib (first 100) 2012-02-16 23:48:57 -05:00
closure.go test: enforce 1 proc in the test 2012-07-01 21:59:50 +04:00
cmp6.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
cmp.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
cmplx.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
cmplxdivide1.go test: use testlib in a few more cases 2012-03-22 02:14:44 +08:00
cmplxdivide.c test: use testlib in a few more cases 2012-03-22 02:14:44 +08:00
cmplxdivide.go test: invoke go command in run.go 2012-03-07 01:54:39 -05:00
complit1.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
complit.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
compos.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
const1.go test: match gccgo error messages 2012-09-28 08:30:30 -07:00
const2.go test: match gccgo error messages 2012-09-28 08:30:30 -07:00
const3.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
const4.go cmd/gc: implement len(array) / cap(array) rule 2012-03-07 22:43:28 -05:00
const5.go test: match gccgo error messages 2012-09-28 08:30:30 -07:00
const.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
convert1.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
convert3.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
convert.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
convlit1.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
convlit.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
convT2X.go cmd/gc: cache itab lookup in convT2I. 2012-07-03 09:09:05 +10:00
copy.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00
crlf.go test: use testlib in a few more cases (part 2) 2012-04-20 23:45:43 +08:00
ddd1.go test: match gccgo error messages 2012-09-28 08:30:30 -07:00
ddd2.go test: use testlib in a few more cases 2012-03-22 02:14:44 +08:00
ddd3.go test: expand run.go's errorcheck, make clear which bugs run 2012-09-23 13:16:14 -04:00
ddd.go test: enable method expression tests in ddd.go 2012-03-07 11:17:26 -08:00
decl.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
declbad.go test: match gccgo error messages 2012-09-28 08:30:30 -07:00
defer.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
deferprint.go test: add cmpout to testlib 2012-02-24 13:17:26 +11:00
deferprint.out test: split golden.out into expected output per test 2012-01-18 16:12:24 -08:00
divide.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
empty.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
env.go os: remove Getenverror 2012-02-18 21:18:13 -08:00
eof1.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
eof.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
errchk errchk: allow multiple patterns 2011-08-16 11:14:26 -04:00
escape2.go cmd/gc: fix escape analysis bug 2012-09-24 15:53:12 -04:00
escape3.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
escape4.go cmd/gc: fix escape analysis bug 2012-09-24 15:53:12 -04:00
escape.go cmd/gc: fix escape analysis bug with variable capture in loops. 2012-08-31 22:23:37 +02:00
float_lit.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
floatcmp.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
for.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
func1.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
func2.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
func3.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
func4.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
func5.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
func6.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
func7.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
func8.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
func.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
gc1.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
gc2.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
gc.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
golden.out cmd/gc: test for issue 3552 2012-05-02 16:56:26 +02:00
goprint.go test: add cmpout to testlib 2012-02-24 13:17:26 +11:00
goprint.out test: split golden.out into expected output per test 2012-01-18 16:12:24 -08:00
goto.go test: explanatory comments [c-g]* 2012-02-19 14:28:53 +11:00
helloworld.go test: add cmpout to testlib 2012-02-24 13:17:26 +11:00
helloworld.out test: split golden.out into expected output per test 2012-01-18 16:12:24 -08:00
if.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
import1.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
import2.go test: use testlib in a few more cases 2012-03-22 02:14:44 +08:00
import3.go test: expand run.go's errorcheck, make clear which bugs run 2012-09-23 13:16:14 -04:00
import4.go test: expand run.go's errorcheck, make clear which bugs run 2012-09-23 13:16:14 -04:00
import5.go gc: disallow absolute import paths 2012-02-29 15:28:36 -05:00
import.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
index.go build: make int 64 bits on amd64 2012-09-24 20:57:01 -04:00
indirect1.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
indirect.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
init1.go test: use testlib (fourth 100) 2012-02-16 23:50:37 -05:00
init.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
initcomma.go test/initcomma.go: restore what it's supposed to be testing 2012-02-20 07:44:24 +11:00
initialize.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
initializerr.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
int_lit.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
intcvt.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
iota.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
label1.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
label.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
linkx.go test: expand run.go's errorcheck, make clear which bugs run 2012-09-23 13:16:14 -04:00
literal.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
mallocfin.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
map1.go cmd/gc: fix type checking loop 2012-06-07 03:06:40 -04:00
map.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
method1.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
method2.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
method3.go test: commentary for [h-m]*.go 2012-02-23 18:47:26 +11:00
method4.go test: expand run.go's errorcheck, make clear which bugs run 2012-09-23 13:16:14 -04:00
method4a.go test: use testlib in a few more cases 2012-03-22 02:14:44 +08:00
method.go cmd/gc: unnamed struct types can have methods 2012-03-07 02:27:15 -05:00
named1.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
named.go gc: return of ideal bool 2012-02-21 22:54:07 -05:00
nil.go test/[n-r]*.go: add documentation 2012-02-24 10:30:39 +11:00
nilptr.go test/[n-r]*.go: add documentation 2012-02-24 10:30:39 +11:00
nul1.go test: expand run.go's errorcheck, make clear which bugs run 2012-09-23 13:16:14 -04:00
parentype.go test/[n-r]*.go: add documentation 2012-02-24 10:30:39 +11:00
peano.go test/[n-r]*.go: add documentation 2012-02-24 10:30:39 +11:00
printbig.go test: add cmpout to testlib 2012-02-24 13:17:26 +11:00
printbig.out test: split golden.out into expected output per test 2012-01-18 16:12:24 -08:00
range.go cmd/gc: fix parallel assignment in range 2012-05-24 23:05:36 -04:00
recover1.go test: use testlib (final 61) 2012-02-16 23:51:04 -05:00
recover2.go test: use testlib (final 61) 2012-02-16 23:51:04 -05:00
recover3.go test/[n-r]*.go: add documentation 2012-02-24 10:30:39 +11:00
recover.go test: add test of calling recover in a varargs function 2012-03-01 08:24:03 -08:00
rename1.go test: fix the fix of the rename tests. 2012-02-24 15:06:32 +11:00
rename.go test: fix the fix of the rename tests. 2012-02-24 15:06:32 +11:00
reorder2.go test/[n-r]*.go: add documentation 2012-02-24 10:30:39 +11:00
reorder.go test: add test for order of evaluation of map index on left of = 2012-04-24 10:17:26 -07:00
rotate.go test: expand run.go's errorcheck, make clear which bugs run 2012-09-23 13:16:14 -04:00
run test: minor fixes in run and testlib 2012-09-24 00:06:31 -04:00
run.go test: Add rundir, rundircmpout and errorcheckdir commands to testlib and run.go 2012-10-06 09:23:31 +02:00
rune.go test/[n-r]*.go: add documentation 2012-02-24 10:30:39 +11:00
runtime.go test/[n-r]*.go: add documentation 2012-02-24 10:30:39 +11:00
shift1.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
shift2.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
sieve.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
sigchld.go test: expand run.go's errorcheck, make clear which bugs run 2012-09-23 13:16:14 -04:00
sigchld.out test: split golden.out into expected output per test 2012-01-18 16:12:24 -08:00
simassign.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
sinit.go test: expand run.go's errorcheck, make clear which bugs run 2012-09-23 13:16:14 -04:00
sizeof.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
solitaire.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
stack.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
string_lit.go cmd/gc: string conversion for surrogates 2012-08-30 11:16:55 -07:00
stringrange.go all: make Unicode surrogate halves illegal as UTF-8 2012-08-08 14:01:23 -07:00
struct0.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
switch3.go cmd/gc: accept switches on comparable arrays. 2012-08-03 21:47:26 +02:00
switch.go cmd/gc: add missing conversion from bool to interface in switches. 2012-09-17 21:29:10 +02:00
testlib test: Add rundir, rundircmpout and errorcheckdir commands to testlib and run.go 2012-10-06 09:23:31 +02:00
torture.go cmd/5g: fix out of registers in nested calls, add compiler torture test. 2012-10-05 23:30:49 +02:00
turing.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
typeswitch1.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
typeswitch2.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
typeswitch3.go test: match gccgo error messages 2012-09-28 08:30:30 -07:00
typeswitch.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
undef.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
utf.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
varerr.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
varinit.go test/[n-z]*.go: add documentation 2012-02-24 11:48:19 +11:00
zerodivide.go test: [a-c]: add introductory comments to tests 2012-02-19 13:19:43 +11:00