dejagnu help: spawning with arguments, running ar
Benjamin Kosnik
bkoz@redhat.com
Mon Jun 12 18:52:00 GMT 2006
> Well, in your example from your earlier post, you would have wanted
> something like
>
> set commandline "./pair.exe"
> if { some condition }
> {
> set commandline "$commandline 1 1000 2"
> }
> set result [catch "eval spawn \{${commandline}\}" pid];
>
> ..is that what you mean? The commandline to spawn is basically a shell
> command line, you can use redirection and so on, although there are problems
> with full pipelines. Take a look at local_exec in
> ${prefix}/share/dejagnu/remote.exp and particularly the warnings and caveats
> in the comments at the start.
Thanks.
Ian answered this for me on IRC. What I was really looking for was
something like dg-options, but for execution, not compilation.
Ie, something where I could add
// { dg-execute-options "1 100 2" }
to the test file in question. This doesn't exist, and Ian explained the
historical reasons for this. (Which led me to re-think using
command-line args for new tests.)
I'm trying to avoid special casing a bunch of new tests, or testsuite
directory naming hacks.
However, I've found another way around this, which doesn't involve
passing in argc/argv values.
Thanks for your help though, it's appreciated.
-benjamin
More information about the Libstdc++
mailing list