d: Don't create gdc.test symlink in the gdc testsuite directory
authorIain Buclaw <ibuclaw@gdcproject.org>
Thu, 25 Mar 2021 23:57:54 +0000 (00:57 +0100)
committerIain Buclaw <ibuclaw@gdcproject.org>
Sun, 28 Mar 2021 12:47:36 +0000 (14:47 +0200)
commitbe080b17271cfbe3b8b46d9ca635f8d77de2088e
tree7f709385a7d09fbd495432020a53e24b8d411c66
parent0907036f4541cfb51a626ef13c282f7be2098add
d: Don't create gdc.test symlink in the gdc testsuite directory

Instead, tests are copied from the source tree (i.e: $srcdir/compilable)
into the test base directory ($base_dir/compilable).   A dejagnu test
file with all translated test directives is created in a path that
follows DejaGnu naming conventions ($base_dir/gdc.test/compilable),
which is then passed to `dg-test'.

Before invoking the compiler, the gdc.test prefixed is trimmed from the
test program in `gdc-dg-test' so that all copied test files are picked
up with the correct path names.

gcc/testsuite/ChangeLog:

* lib/gdc-utils.exp (gdc-copy-extra): Rename to...
(gdc-copy-file): ... this.  Use file copy instead of open/close.
(gdc-convert-test): Save translated dejagnu test to gdc.test
directory, only write dejagnu directives to the test file.
(gdc-do-test): Don't create gdc.test symlink.
gcc/testsuite/lib/gdc-utils.exp