diff options
author | David Malcolm <dmalcolm@redhat.com> | 2017-10-31 20:40:10 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2017-10-31 20:40:10 +0000 |
commit | 77f4ead72e55094fca78530bff75f83eb0faadbd (patch) | |
tree | 948ebc9e41f6bf42946a6d4cfebf912145df61fd /gcc/testsuite/jit.dg | |
parent | 84ffba1283c323e559d487f5a44012e2481f7c85 (diff) | |
download | gcc-77f4ead72e55094fca78530bff75f83eb0faadbd.zip gcc-77f4ead72e55094fca78530bff75f83eb0faadbd.tar.gz gcc-77f4ead72e55094fca78530bff75f83eb0faadbd.tar.bz2 |
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
Diffstat (limited to 'gcc/testsuite/jit.dg')
-rw-r--r-- | gcc/testsuite/jit.dg/jit.exp | 9 |
1 files changed, 9 insertions, 0 deletions
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] } |