From: Doug Evans <dje@google.com>
To: Hans-Peter Nilsson <hp@bitrange.com>
Cc: Mike Frysinger <vapier@gentoo.org>, gdb-patches@sourceware.org
Subject: Re: [PATCH] sim: constify watchpoint interrupt names
Date: Wed, 31 Mar 2010 23:43:00 -0000 [thread overview]
Message-ID: <l2te394668d1003311643q8bb8ef84k589e0b950dda650@mail.gmail.com> (raw)
In-Reply-To: <alpine.BSF.2.00.1003302031260.42439@dair.pair.com>
On Tue, Mar 30, 2010 at 6:45 PM, Hans-Peter Nilsson <hp@bitrange.com> wrote:
> On Tue, 30 Mar 2010, Mike Frysinger wrote:
>> On Tuesday 30 March 2010 19:20:56 Hans-Peter Nilsson wrote:
>> > Feel free to commit with a suitable ChangeLog entry if
>> > tests pass.
>>
>> they do pass, and this reminds me of why dejagnu is so damn annoying. a
>> simple `make check-sim` fails by default because the sim framework attempts to
>> execute the binary on the host instead of through the sim. seems pretty dumb
>> to me.
>
> JFTR, you're supposed to specify a "board", like so:
> "make check-sim RUNTESTFLAGS=--target_board=v850-sim" but you
> know that as you have run tests.
>
> Target executable files always default to the host (through
> "unix.exp" aka. --target_board=unix). That you're testing the
> simulator itself by running the target executable files there is
> just a special-case, but anyway I guess it'd be a good idea
> (read: feel free to send patches) for the simulator Makefile.in
> to default to its dejagnu board when running the tests, e.g. to
> default RUNTESTFLAGS to the above. ...or maybe even better, as
> Doug suggested.
For reference sake,
an alternative to explicitly passing --target_board is to point
$DEJAGNU at a file that specifies what target to use, e.g. based on
target-triplet/tool.
The m32r case I use is mildly interesting. The syntax is clumsy, but
I keep it around to remind me how to automagically run multiple
variations with one "make check".
A "make check" of m32r produces:
=== sim tests ===
Schedule of variations:
m32r-sim/-mmodel=small/-G 0/-m32r
m32r-sim/-mmodel=small/-G 0/-m32rx
m32r-sim/-mmodel=small/-msdata=use -G 8/-m32r
m32r-sim/-mmodel=small/-msdata=use -G 8/-m32rx
m32r-sim/-mmodel=medium/-G 0/-m32r
m32r-sim/-mmodel=medium/-G 0/-m32rx
m32r-sim/-mmodel=medium/-msdata=use -G 8/-m32r
m32r-sim/-mmodel=medium/-msdata=use -G 8/-m32rx
m32r-sim/-mmodel=large/-G 0/-m32r
m32r-sim/-mmodel=large/-G 0/-m32rx
m32r-sim/-mmodel=large/-msdata=use -G 8/-m32r
m32r-sim/-mmodel=large/-msdata=use -G 8/-m32rx
Running target m32r-sim/-mmodel=small/-G 0/-m32r
Using /usr/share/dejagnu/baseboards/m32r-sim.exp as board description
file for target.
[...]
[There's also the MULTIPASS/PASS vars to control running multiple
passes in one "make check" if one wants to do that kind of thing.]
In case it helps, here's $DEJAGNU from one of my systems:
--- snip ---
set run_multiple_targets 1
send_user "target_triplet: $target_triplet\n"
if [info exists tool] {
send_user "tool: $tool\n"
}
switch -glob "$target_triplet" {
"arm-*-elf" {
if { "$tool" == "sim" } {
set target_list { arm-sim }
} else {
set target_list { arm-sid }
}
}
"powerpc-*-*" {
set target_list { powerpc-sim }
}
"powerpcle-*-*" {
set target_list { powerpcle-sim }
}
"m32r-*-elf*" {
if { $run_multiple_targets } {
set target_list
{{{m32r-sim{-mmodel=small,-mmodel=medium,-mmodel=large}{-G
0,-msdata=use -G 8}}{-m32r,-m32rx}}}
} else {
set target_list { m32r-sim }
}
}
"i?86-*-nacl*" {
set target_list "nacl"
}
"i?86-*-*" {
set target_list { unix }
}
"x86_64-*-*" {
set target_list { unix }
}
"i960-*-coff" {
set target_list { i960-sim }
}
"cris-*-elf" {
set target_list { cris-sim }
}
"fr30-*-elf" {
set target_list { fr30-sim }
}
"frv-*-elf" {
set target_list { frv-sim }
}
"ip2k-*-elf" {
set target_list { ip2k-sim }
}
"iq2000-*-elf" {
set target_list { iq2000-sim }
}
"lm32-*-elf" {
set target_list { lm32-sim }
}
"m32c-*-elf" {
set target_list { m32c-sim }
}
"m68hc08-*-*" {
set target_list { m68hc08-sim }
}
"mep-*-elf" {
set target_list { mep-sim }
}
"mt-*-elf" {
set target_list { mt-sim }
}
"openrisc-*-elf" {
set target_list { openrisc-sim }
}
"or32-*-elf" {
set target_list { openrisc-sim }
}
"sh64-*-elf" {
set target_list { sh64-sim }
}
"xc16x-*-elf" {
set target_list { xc16x-sim }
}
"xstormy16-*-elf" {
set target_list { xstormy16-sid }
}
default {
send_user "ERROR: dejagnu.exp Unknown target $target_triplet\n"
exit 1
}
}
if [info exists target_list] {
send_user "target_list: $target_list\n"
} else {
send_user "target_list: unspecified\n"
}
prev parent reply other threads:[~2010-03-31 23:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-29 21:49 Mike Frysinger
2010-03-30 16:19 ` Tom Tromey
2010-03-30 22:53 ` Hans-Peter Nilsson
2010-03-30 23:07 ` Mike Frysinger
2010-03-30 23:21 ` Hans-Peter Nilsson
2010-03-30 23:42 ` Mike Frysinger
2010-03-31 1:20 ` Doug Evans
2010-03-31 1:46 ` Hans-Peter Nilsson
2010-03-31 3:42 ` Mike Frysinger
2010-03-31 23:43 ` Doug Evans [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=l2te394668d1003311643q8bb8ef84k589e0b950dda650@mail.gmail.com \
--to=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=hp@bitrange.com \
--cc=vapier@gentoo.org \
/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