testsuite: Handle more kinds of gdc.test test flags and directives.
authorIain Buclaw <ibuclaw@gdcproject.org>
Sun, 29 Mar 2020 18:43:01 +0000 (20:43 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Sun, 29 Mar 2020 19:43:50 +0000 (21:43 +0200)
commit60c254b279e8e8443b8ad26cc46b9e4084cff66c
tree5df8f7071ff19e4b8318e4332967ef539ce5e258
parentafd9da8b8ad01268478fca6db3f63ca4c51b1900
testsuite: Handle more kinds of gdc.test test flags and directives.

This patch adds cases for JSON and D header file generation flags in the
testsuite, and sets up the test accordingly to only compile, then check
that the expected output file exists.

Support has also been added for the DFLAGS test directive, which
disables testing with all default flag permutations.

gcc/testsuite/ChangeLog:

* lib/gdc-utils.exp: (gdc-convert-args): Handle compilation test
arguments -D, -H, -X, and set compilable_output_file_ext.
(gdc-convert-test): Document and add cases DFLAGS and
EXTRA_CPP_SOURCES.  Add dg-final entry for output generation tests,
and set compilable_do_what to compile.
(gdc-do-test): Define compilable_do_what, default to assemble.
gcc/testsuite/ChangeLog
gcc/testsuite/lib/gdc-utils.exp