Re: Setting environment variables when doing remove execution
Jacob Bachmeyer <[email protected]>
| Newsgroups | gmane.comp.sysutils.dejagnu.general |
|---|---|
| Message-ID | <[email protected]> |
Tobias Burnus wrote: > On 11/26/19 12:53 AM, Jacob Bachmeyer wrote: >> As an interim measure, could you simply prepend the needed >> environment variables to the remote command and/or use env(1)? > > I thought of doing this – but while for compiling it is simple, doing > so for run time is more difficult. > > [...] > > This does not make injecting "env a=val b=val $prog" that simple. Well, so much for the simple and easy option, then. Does the remote always have a Bourne shell? Could you simply execute "export a=val b=val" first? Or add another GCC callback that resolves what type of shell the remote has and produces the correct "export"/"setenv"/"set" command? Overall, I agree that DejaGnu should eventually add a remote_setenv command or some way of specifying environment variables and I am planning to eventually rework the remote target handling after migrating DejaGnu to use Tcl namespaces for at least its own code. That is pretty far down my TODO list however. -- Jacob