PR jit/63854: Add support for running "make check-jit" under valgrind
commitf0591a765a22ab29160a52e759b914dd02857da0
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Dec 2014 16:13:29 +0000 (1 16:13 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Dec 2014 16:13:29 +0000 (1 16:13 +0000)
tree329d381833dfa56a6bcf2c56d308a3c874c4f52d
parent2bae36401bc5a5b30ac500febdd60e1a0101777e
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218227 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/testsuite/ChangeLog
gcc/testsuite/jit.dg/jit.exp