From 77f4ead72e55094fca78530bff75f83eb0faadbd Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Tue, 31 Oct 2017 20:40:10 +0000 Subject: jit: add a way to preserve testsuite executables gcc/jit/ChangeLog: * docs/internals/index.rst (Running the test suite): Document PRESERVE_EXECUTABLES. (Running under valgrind): Add markup to RUN_UNDER_VALGRIND. * docs/_build/texinfo/libgccjit.texi: Regenerate. gcc/testsuite/ChangeLog: * jit.dg/jit.exp (jit-dg-test): If PRESERVE_EXECUTABLES is set in the environment, don't delete the generated executable. From-SVN: r254282 --- gcc/testsuite/jit.dg/jit.exp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/testsuite/jit.dg') diff --git a/gcc/testsuite/jit.dg/jit.exp b/gcc/testsuite/jit.dg/jit.exp index 39e37c2..869d9f6 100644 --- a/gcc/testsuite/jit.dg/jit.exp +++ b/gcc/testsuite/jit.dg/jit.exp @@ -580,6 +580,15 @@ proc jit-dg-test { prog do_what extra_tool_flags } { verbose "$name is not meant to generate a reproducer" } + # Normally we would return $comp_output and $output_file to the + # caller, which would delete $output_file, the generated executable. + # If we need to debug, it's handy to be able to suppress this behavior, + # keeping the executable around. + set preserve_executables [info exists env(PRESERVE_EXECUTABLES)] + if $preserve_executables { + set output_file "" + } + return [list $comp_output $output_file] } -- cgit v1.1