Setting PATH for jtreg

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting PATH for jtreg

Volker Simonis
Hi,

the jtreg FAQ states in point 4.1:

As per spec, the only shell environment variables that are propagated
into the test's JVM are:

    * Linux and Solaris:
          o PATH is set to /bin:/usr/bin

However in our environment, the compilers are installed on a global
NFS-share. I have the problem that all the tests which use gcc to
compile native JNI files fail because they get a wrong version of gcc
from /usr/bin.

Is there any possibility how I can override the PATH variable for jtreg?

Regards,
Volker
Reply | Threaded
Open this post in threaded view
|

Re: Setting PATH for jtreg

jonathan.gibbons
Volker,

jtreg has a -e option for tunnelling env variables into scripts.
Use "jtreg -help -e" for info.   Any values specified with -e
override any defaults set up for the test. So, it should work
to use -e:PATH to override the system default value of PATH
with the value from your current environment.

-- Jon


On Oct 13, 2008, at 8:23 AM, Volker Simonis wrote:

> Hi,
>
> the jtreg FAQ states in point 4.1:
>
> As per spec, the only shell environment variables that are propagated
> into the test's JVM are:
>
>    * Linux and Solaris:
>          o PATH is set to /bin:/usr/bin
>
> However in our environment, the compilers are installed on a global
> NFS-share. I have the problem that all the tests which use gcc to
> compile native JNI files fail because they get a wrong version of gcc
> from /usr/bin.
>
> Is there any possibility how I can override the PATH variable for  
> jtreg?
>
> Regards,
> Volker

Reply | Threaded
Open this post in threaded view
|

Re: Setting PATH for jtreg

Volker Simonis
Hi John,

thank you for the fast help. "-e:PATH" indeed solved the problem.

Now that you pointed me to the option I must admit that it is really
there. Unfortunately, I didn't found it before, although I did "jtreg
-help" several times. This may be perhaps because it is in the
"JDK-related Options". For me, this is not strictly a JDK-related
option and would better fit into the "General Options". But this is of
course purely a matter of taste:)

However I think a small advice in the FAQ section 4.1 cited below that
PATH can be overriden with the "-e:PATH" option may be helpfull to
others as well.

Once again thank you and best regards,
Volker


On 10/13/08, Jonathan Gibbons <[hidden email]> wrote:

> Volker,
>
>  jtreg has a -e option for tunnelling env variables into scripts.
>  Use "jtreg -help -e" for info.   Any values specified with -e
>  override any defaults set up for the test. So, it should work
>  to use -e:PATH to override the system default value of PATH
>  with the value from your current environment.
>
>  -- Jon
>
>
>
>  On Oct 13, 2008, at 8:23 AM, Volker Simonis wrote:
>
>
> > Hi,
> >
> > the jtreg FAQ states in point 4.1:
> >
> > As per spec, the only shell environment variables that are propagated
> > into the test's JVM are:
> >
> >   * Linux and Solaris:
> >         o PATH is set to /bin:/usr/bin
> >
> > However in our environment, the compilers are installed on a global
> > NFS-share. I have the problem that all the tests which use gcc to
> > compile native JNI files fail because they get a wrong version of gcc
> > from /usr/bin.
> >
> > Is there any possibility how I can override the PATH variable for jtreg?
> >
> > Regards,
> > Volker
> >
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Setting PATH for jtreg

jonathan.gibbons
Volker,

Thank you for the update and suggestions.

Your comment about it being more of a general option
and not a JDK option and your suggestion about
the FAQ are noted.

-- Jon






On Oct 14, 2008, at 12:30 AM, Volker Simonis wrote:

> Hi John,
>
> thank you for the fast help. "-e:PATH" indeed solved the problem.
>
> Now that you pointed me to the option I must admit that it is really
> there. Unfortunately, I didn't found it before, although I did "jtreg
> -help" several times. This may be perhaps because it is in the
> "JDK-related Options". For me, this is not strictly a JDK-related
> option and would better fit into the "General Options". But this is of
> course purely a matter of taste:)
>
> However I think a small advice in the FAQ section 4.1 cited below that
> PATH can be overriden with the "-e:PATH" option may be helpfull to
> others as well.
>
> Once again thank you and best regards,
> Volker
>
>
> On 10/13/08, Jonathan Gibbons <[hidden email]> wrote:
>> Volker,
>>
>> jtreg has a -e option for tunnelling env variables into scripts.
>> Use "jtreg -help -e" for info.   Any values specified with -e
>> override any defaults set up for the test. So, it should work
>> to use -e:PATH to override the system default value of PATH
>> with the value from your current environment.
>>
>> -- Jon
>>
>>
>>
>> On Oct 13, 2008, at 8:23 AM, Volker Simonis wrote:
>>
>>
>>> Hi,
>>>
>>> the jtreg FAQ states in point 4.1:
>>>
>>> As per spec, the only shell environment variables that are  
>>> propagated
>>> into the test's JVM are:
>>>
>>>  * Linux and Solaris:
>>>        o PATH is set to /bin:/usr/bin
>>>
>>> However in our environment, the compilers are installed on a global
>>> NFS-share. I have the problem that all the tests which use gcc to
>>> compile native JNI files fail because they get a wrong version of  
>>> gcc
>>> from /usr/bin.
>>>
>>> Is there any possibility how I can override the PATH variable for  
>>> jtreg?
>>>
>>> Regards,
>>> Volker
>>>
>>
>>