RFR: 8238263: Create at-requires mechanism for containers
Harold Seigel
hseigel at openjdk.java.net
Mon Oct 26 13:52:10 UTC 2020
On Fri, 23 Oct 2020 20:08:01 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:
>>> I think it depends on whether the tests will be permanently or temporarily excluded from running with containers. I thought this mechanism would be to permanently exclude the tests. That's why I used `@requires`.
>>
>> I see, if this is for permanent exclusion then yes I agree that `@requires` is a better choice.
>>
>>>> enable this option based on an environment variable so we don?t have to remember the
>> cryptic command line sequence.
>>> I'll look into basing the option on an environment variable.
>>
>> one will still need to pass an environment variable to jtreg, and hence will need to remember some sort of "cryptic command line sequence". a solution for that might be to default `jdk.containerized` to `false` in `VMProps.java` and when only _containerized_ runs will have to set it up.
>>
>>
>> btw, I'm not sure that `jdk.containerized` is the best name for this property as _containerization_ is more of an environmental characteristic than that of jdk. how about smth like `env.containerized` or `testenv.containerized`?
>
>> > one will still need to pass an environment variable to jtreg, and hence will need to remember some sort of "cryptic command line sequence". a solution for that might be to default `jdk.containerized` to `false` in `VMProps.java` and when only _containerized_ runs will have to set it up.
>>
>> Why? Environment variables are inherited. For developers running jtreg, all they need to do is export the variable.
>>
>> % export JAVA_CONTAINERIZED=1
>> % bash
>> % echo $JAVA_CONTAINERIZED
>> % 1
>
> b/c jtreg strips most of the environment variables, they might still be defined in the process which runs `VMProps` though (I have never checked that)
Defining an environment variable works when running JTReg from the command line. But, mach5 does not pass environment variable settings to its JTReg test runs. Some mach5 special command args would still be needed.
-------------
PR: https://git.openjdk.java.net/jdk/pull/844
More information about the core-libs-dev
mailing list