[RFR] (XS) 8144677: jprt.properties should allow creating a user specified testset with custom build flavors and build targets

David Holmes david.holmes at oracle.com
Tue Dec 8 03:49:02 UTC 2015


On 7/12/2015 9:39 PM, Erik Joelsson wrote:
>
>
> On 2015-12-07 12:18, David Holmes wrote:
>> On 7/12/2015 6:33 PM, Erik Joelsson wrote:
>>>
>>>
>>> On 2015-12-04 22:00, Chris Plummer wrote:
>>>> Hello,
>>>>
>>>> Please review the following:
>>>>
>>>> https://bugs.openjdk.java.net/browse/JDK-8144677
>>>> http://cr.openjdk.java.net/~cjplummer/8144677/webrev.01/webrev/
>>>>
>>>> Tested with JPRT with:
>>>>   • "-testset hotspot"
>>>>   • "-testset svc"
>>>>   • "-testset chris" from the example custom testset provided in the
>>>> CR.
>>>>   • no testset specified
>>>>
>>>> BTW, if anyone knows of an "include" mechanism for jprt.properties,
>>>> please let me know. Although that won't change the need for the above
>>>> changes, it would make it possible to put custom testsets in a file
>>>> rather than having to paste them in your ~/.jprt.properties file.
>>>>
>>> JPRT properties files are pretty special, but to my knowledge, there is
>>> no include mechanism. I don't think it would be hard to implement
>>> though.
>>
>> They aren't really special they just use Properties.loadFromStream (or
>> something like that). To do an include mechanism you'd have to
>> implement all the reading and parsing logic yourself.
>>
> They are special in that there are a lot of constructs not normal to
> properties, like ${foo} expansion, weird conditionals and expanding
> variants {foo|bar}.

Yes but that is what JPRT does after loading the properties. It then 
post processes them to do expansion etc.

> None of these are order dependent however, meaning,
> it doesn't matter which order you put the properties in. The evaluation
> of all those things happens when a property is read, not when it is
> parsed. So the only reasonable implementation of include, at least as I
> see it, would be to read a file like now, check a special "include-file"
> property for new values and if so, read that file too.

Yeah I guess that would work. Though there are some ordering issues as 
properties read from later files can override values read from earlier 
ones. In essence this would be a way to add another properties file to 
the set of files read (jprt distribution, repo, user). But if you want 
to do that its easier to just add a command-line arg to specify the 
additional file.

Anyway this is going somewhat OT for Chris's change. If someone thinks 
allowing an additional custom properties file is useful then can file a RFE.

Cheers,
David

> /Erik
>> David
>>
>>
>>> /Erik
>>>
>



More information about the build-dev mailing list