This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: dejagnu help: spawning with arguments, running ar


>   Ok, how's that meant to work?!?  I don't see anything that suggests you can
> just invoke arbitrary executables from an expect script; it's not a shell
> script.  

Yes.... I said "naive." I was hoping to lure dejagnu hackers out of the
woodwork with it.

>Take a look at local_exec and remote_exec in
> /usr/share/dejagnu/remote.exp; you'd generally want to defer to one of those.
> This is how the compiler is invoked, for example; if you follow through
> v3_target_compile to gcc/testsuite/lib/gcc.exp:gcc_target_compile to
> /usr/share/dejagnu/target.exp:target_compile to default_target_compile to
> /usr/share/dejagnu/remote.exp:remote_exec to local_exec you'll eventually see
> that you need to build up your command line and wrap it in a construct like
> 
> 	set result [catch "eval spawn \{${commandline}\}" pid];

This was helpful, thanks.

>   Isn't "Just append them to the commandline that gets spawned" the answer
> you're looking for?

Any chance I could get a pointer from you (like above), or even better
a simple example?

best,
benjamin


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