]> Cypherpunks repositories - gostls13.git/commit
test: support -ldflags for "rundir" tests, new -P option
authorThan McIntosh <thanm@google.com>
Fri, 22 Mar 2019 19:24:36 +0000 (15:24 -0400)
committerThan McIntosh <thanm@google.com>
Mon, 25 Mar 2019 14:59:58 +0000 (14:59 +0000)
commitfbd74a8922434ada5871a875598b58cbca4ff0d6
treea3847a1efb8a9ded5c54c08867f27ac89c69ce45
parent68a98d52794fc324841f62732411f6bba23fc62c
test: support -ldflags for "rundir" tests, new -P option

For "rundir" tests, allow users to add in linker flags as well as
compiler flags, e.g.

// rundir -m -ldflags -w

The directive above will pass "-m" to the compiler on each package compilation
and "-w" to the linker for the final link.

In addition, if "-P" is specified with 'rundir', then for each compile
pass in "-p <X>" to set the packagepath explicitly, which is closer to
how the compiler is run by 'go build'.

Change-Id: I04720011a89d1bd8dcb4f2ccb4af1d74f6a01da1
Reviewed-on: https://go-review.googlesource.com/c/go/+/168977
Reviewed-by: Cherry Zhang <cherryyz@google.com>
test/run.go