Previously, "test-foo.c" would be built by jit.exp as "test-foo.exe".
However, we have various test-foo.c vs test-foo.cc testcases. We don't want them to clobber each other's executables (especially if we're going to parallelize the jit testsuite). Hence retain the extension, so they are built to "test-foo.c.exe" and "test-foo.cc.exe". Doing so also ensures that the source name makes it into the pass/fail output, so that we can distinguish e.g. which test-foo is failing. jit.sum remains: # of expected passes 5008 (we don't yet actually run the .cc testcases due to another issue, but this patch ought to help with debugging that) Committed to trunk as r219312. gcc/jit/ChangeLog: * docs/internals/index.rst: Update to reflect that built testcases are now test-foo.c.exe, rather than test-foo.exe. * docs/_build/texinfo/libgccjit.texi: Regenerate. gcc/testsuite/ChangeLog: * jit.dg/jit.exp (jit-dg-test): Remove "rootname" call when generating name of built executable. --- gcc/jit/docs/internals/index.rst | 8 ++++---- gcc/testsuite/jit.dg/jit.exp | 14 +++++++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/gcc/jit/docs/internals/index.rst b/gcc/jit/docs/internals/index.rst index 50c55b0..694f058 100644 --- a/gcc/jit/docs/internals/index.rst +++ b/gcc/jit/docs/internals/index.rst @@ -125,7 +125,7 @@ and once a test has been compiled, you can debug it directly: LD_LIBRARY_PATH=. \ LIBRARY_PATH=. \ gdb --args \ - testsuite/jit/test-factorial.exe + testsuite/jit/test-factorial.c.exe Running under valgrind ********************** @@ -161,11 +161,11 @@ For example, the following invocation verbosely runs the testcase $ less testsuite/jit/jit.sum (...other results...) - XFAIL: jit.dg/test-sum-of-squares.c: test-sum-of-squares.exe.valgrind.txt: definitely lost: 8 bytes in 1 blocks - XFAIL: jit.dg/test-sum-of-squares.c: test-sum-of-squares.exe.valgrind.txt: unsuppressed errors: 1 + XFAIL: jit.dg/test-sum-of-squares.c: test-sum-of-squares.c.exe.valgrind.txt: definitely lost: 8 bytes in 1 blocks + XFAIL: jit.dg/test-sum-of-squares.c: test-sum-of-squares.c.exe.valgrind.txt: unsuppressed errors: 1 (...other results...) - $ less testsuite/jit/test-sum-of-squares.exe.valgrind.txt + $ less testsuite/jit/test-sum-of-squares.c.exe.valgrind.txt (...shows full valgrind report for this test case...) When running under valgrind, it's best to have configured gcc with diff --git a/gcc/testsuite/jit.dg/jit.exp b/gcc/testsuite/jit.dg/jit.exp index 454e656..474d6f8 100644 --- a/gcc/testsuite/jit.dg/jit.exp +++ b/gcc/testsuite/jit.dg/jit.exp @@ -325,7 +325,19 @@ proc jit-dg-test { prog do_what extra_tool_flags } { } # Determine what to name the built executable. - set output_file "[file rootname [file tail $prog]].exe" + # + # We simply append .exe to the filename, e.g. + # "test-foo.c.exe" + # since some testcases exist in both + # "test-foo.c" and + # "test-foo.cc" + # variants, and we don't want them to clobber each other's + # executables. + # + # This also ensures that the source name makes it into the + # pass/fail output, so that we can distinguish e.g. which test-foo + # is failing. + set output_file "[file tail $prog].exe" verbose "output_file: $output_file" # Create the test executable: -- 1.8.5.3