PR jit/63854: Add support for running "make check-jit" under valgrind
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 1 Dec 2014 16:13:29 +0000 (16:13 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Mon, 1 Dec 2014 16:13:29 +0000 (16:13 +0000)
commitd86dd9cb94c24ac761bdaa2110e72494f07c4df9
tree329d381833dfa56a6bcf2c56d308a3c874c4f52d
parentc985705ae91243bdabd4d828365017ef264bbd91
PR jit/63854: Add support for running "make check-jit" under valgrind

gcc/testsuite/ChangeLog:
PR jit/63854
* jit.dg/jit.exp (report_leak): New.
(parse_valgrind_logfile): New.
(fixed_host_execute): Detect if RUN_UNDER_VALGRIND is present
in the environment, and if so, run the executable under
valgrind, capturing valgrind's output to a logfile.  Parse the
log file, generating PASSes and XFAILs for the summary of leaks.
Use "wait" before "close": valgrind might not have finished
writing the log out before we parse it, so we need to wait for
the spawnee to finish.

From-SVN: r218227
gcc/testsuite/ChangeLog
gcc/testsuite/jit.dg/jit.exp