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

Iain Buclaw <ibuclaw at gdcproject dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw at gdcproject dot org

--- Comment #1 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
(In reply to Rainer Orth from comment #0)
> Created attachment 45010 [details]
> 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.
> 

Would changing the working directory to gdc.test to run the build commands not
have the same effect?


> 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.

Yes, that is indeed wrong.  I will just say that upstream have their own test
runner program for running the D2 test-suite, the dejagnu scripts we have try
to make a best effort in imitating it, hence the conversion/preprocessing it.

Reply via email to