public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] [RFC] sim: testsuite: support @vars@ in flags
Date: Fri, 20 Nov 2015 19:32:00 -0000	[thread overview]
Message-ID: <20151120193250.GE23754@vapier.lan> (raw)
In-Reply-To: <564F3E10.1010002@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1415 bytes --]

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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2015-11-20 19:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10  6:46 Mike Frysinger
2015-11-20 15:36 ` Pedro Alves
2015-11-20 19:32   ` Mike Frysinger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151120193250.GE23754@vapier.lan \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).