This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [RFC] sim: testsuite: support @vars@ in flags


On 20 Nov 2015 15:36, Pedro Alves wrote:
> On 11/10/2015 06:46 AM, Mike Frysinger wrote:
> > Sometimes in tests, we need supplemental files like linker scripts or
> > board helper files.  There's no way to set those flags in the tests
> > currently and relative paths don't work (breaks out of tree builds).
> > 
> > Update the main option parser to replace some strings on the fly.  Now
> > tests can do things like:
> > # ld: -T@srcdir@/@subdir@/sample.ld
> > 
> > I'm not sure if there's any precedence for things like this in the tree.
> 
> Seems like ld's testsuite has something like that.  At least, grepping
> for "subdir" finds a ton of things like these, in .d files:
> 
> ld-d10v/reloc-005.d:2:#ld: -T $srcdir/$subdir/reloc-005.ld
> ld-d10v/reloc-013.d:2:#ld: -T $srcdir/$subdir/reloc-013.ld
> ld-d10v/reloc-014.d:2:#ld: -T $srcdir/$subdir/reloc-014.ld
> ld-d10v/reloc-006.d:2:#ld: -T $srcdir/$subdir/reloc-006.ld

ah, i should have thought of ld tests.  thanks.

> I can't find where the magic $srcdir and $subdir are expanded.  Maybe
> that's just passed through a tcl eval somewhere, which expands the tcl
> variables.

gcc seems to use dg-xxx helpers everywhere and those take care of executing
code in context.  i've made a note to (someday) look into converting the sim
testsuite to use those.  i guess using more of what dejagnu provides is the
right answer ?
-mike

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]