This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug jit/64752] Eliminate use of "file" from the jit testsuite
- From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 06 Feb 2015 23:20:03 +0000
- Subject: [Bug jit/64752] Eliminate use of "file" from the jit testsuite
- Auto-submitted: auto-generated
- References: <bug-64752-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64752
--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Author: dmalcolm
Date: Fri Feb 6 23:19:32 2015
New Revision: 220494
URL: https://gcc.gnu.org/viewcvs?rev=220494&root=gcc&view=rev
Log:
PR jit/64752 - Rewrite jit testsuite to eliminate use of "file"
gcc/testsuite/ChangeLog:
PR jit/64752
* jit.dg/create-code-for-hello-world-executable.h: New file, taken
from jit.dg/test-compile-to-executable.c's create_code, with a
clarification of the output message.
* jit.dg/harness.h (CHECK_NO_ERRORS): Add test and __func__ to the
pass/fail message.
(test_jit): Use CHECK_NO_ERRORS when calling
gcc_jit_context_compile_to_file.
* jit.dg/jit.exp (jit-dg-test): Update grep for rename of
jit-verify-compile-to-file to jit-verify-output-file-was-created.
(jit-setup-compile-to-file): Likewise. Add a verbose comment
about deletions that are attempted.
(jit-verify-compile-to-file): Rename to...
(jit-verify-output-file-was-created): ...this, and drop the
attempt to run "file" and verify the output.
(jit-verify-assembler): New function.
(jit-verify-object): New function.
(jit-verify-dynamic-library): New function.
* jit.dg/test-compile-to-assembler.c (create_code): Eliminate in
favor of an implementation from new file
create-code-for-hello-world-executable.h, which also adds a
"main".
(dg-final): Replace jit-verify-compile-to-file with
jit-verify-output-file-was-created, and invoke new function
jit-verify-assembler.
* jit.dg/test-compile-to-dynamic-library.c (create_code): Clarify
the output message.
(dg-final): Replace jit-verify-compile-to-file with
jit-verify-output-file-was-created, and invoke new function
jit-verify-dynamic-library.
* jit.dg/test-compile-to-executable.c (create_code): Eliminate in
favor of an implementation from new file
create-code-for-hello-world-executable.h, which also adds a
"main".
(dg-final): Replace jit-verify-compile-to-file with
jit-verify-output-file-was-created. Strengthen the expected stdout
from the built executable.
* jit.dg/test-compile-to-object.c (create_code): Eliminate in
favor of an implementation from new file
create-code-for-hello-world-executable.h, which also adds a
"main".
(dg-final): Replace jit-verify-compile-to-file with
jit-verify-output-file-was-created, and invoke new function
jit-verify-object.
* jit.dg/verify-dynamic-library.c: New source file.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/jit.dg/harness.h
trunk/gcc/testsuite/jit.dg/jit.exp
trunk/gcc/testsuite/jit.dg/test-compile-to-assembler.c
trunk/gcc/testsuite/jit.dg/test-compile-to-dynamic-library.c
trunk/gcc/testsuite/jit.dg/test-compile-to-executable.c
trunk/gcc/testsuite/jit.dg/test-compile-to-object.c