https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88041

            Bug ID: 88041
           Summary: gdc.test tests should include that prefix in test
                    names
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: ibuclaw at gcc dot gnu.org
        Depends on: 88040
  Target Milestone: ---

Created attachment 45010
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45010&action=edit
proposed patch

The gdc.test tests currently omit that prefix from the test names and are thus
not in line with GCC and DejaGnu conventions.

I've started working on this.  In a first attempt, I tried to fix gdc-test.exp,
generating the preprocessed tests in a gdc.test subdir.  However, that turned
out to be pretty intrusive and finally fell apart when I noticed that several
of the tests assume the current names due to something like

// REQUIRED_ARGS: -lib -Icompilable/imports

Of course, I could also insert gdc.test/ there during preprocessing, but this
seems like a loosing battle.

Instead, I took a different route: simply create a symlink from gdc.test to .
so both the prefixed and unprefixed names work.

The resulting patch is almost trivial and works with just two exceptions:

dc.test/compilable/line.d:17:5: error: static assert 
("gdc.test/compilable/line.d" == "compilable/line.d") is false
compiler exited with status 1
PASS: gdc.test/compilable/line.d   (test for excess errors)
FAIL: gdc.test/compilable/line.d   output-exists line.o

gdc.test/runnable/testkeyword.d:9:1: error: static assert  (getCalleeFile() ==
"runnable/imports/testkwd_file.d") is false
compiler exited with status 1
PASS: gdc.test/runnable/testkeyword.d   (test for excess errors)
UNRESOLVED: gdc.test/runnable/testkeyword.d   compilation failed to produce
executable

This is where gdc support for -ffile-prefix-map (PR d/88040) would come in
quite handy.

I'm attaching the current patch, which also contains two minor issues I 
discovered during the first implementation of the patch: two files have
EXTRA_SOURCES: lines with absolute pathnames, which cannot be right.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88040
[Bug 88040] gdc silently ignores -ffile-prefix-map

Reply via email to