On 3/12/19 3:28 PM, Ian Lance Taylor wrote:
On Tue, Mar 12, 2019 at 11:20 AM Aldy Hernandez <al...@redhat.com> wrote:
I have some libgo failures which I'm pretty sure I caused (see below for
details), but I can't seem to figure out how to reproduce. Before I go
down the rabbit hole, is there an easy way of reproducing say:
FAIL: database/sql
FAIL: net/http
I'm used to scouring
x86_64-pc-linux-gnu/libWHATEVER/testsuite/libWHATEVER.log and gaining
insight on how to manually run tests. However, there's nothing in
libgo/testsuite, and libgo/libgo.log just has a summary of tests.
Ideally I'd like a way of building a test (with say -fdump-tree-all),
and/or sticking gdb on the resulting executable.
To run a test, cd to the libgo build directly (TARGET/libgo) and run
`make database/sql/check`. To see the exact commands that it runs,
including how the compiler is invoked, run `make GOTESTFLAGS=--trace
database/sql/check`. To leave the directory behind with the test
program, run `make GOTESTFLAGS=--keep database/sql/check`. That will
leave a gotestNNNN/test directory. In that directory you can run
`LD_LIBRARY_PATH=../../.libs ./a.out -test.short` to run the tests.
You can run specific failing tests using a -test.run option. You can
of course run gdb on the program.
Hope that helps.
Thank you very very much. This was exactly what I needed. Bug fixed,
btw :).
Is this information available somewhere in our docs or wiki? It'd be
incredibly useful for others I bet.
Thanks.
Aldy