@@ -52,17 +52,21 @@ public TestInfo parse() {
52
52
boolean isValidVendor = (vendors .size () == 0 ) || vendors .contains (arg .getVendor ());
53
53
if (!isValidVendor ) return null ;
54
54
55
- // Do not generate make target if subset doesn't match the exported jdk_version
56
- List <String > subsets = new ArrayList <String >();
57
- getElements (subsets , "subsets" , "subset" , null , ti .getTestCaseName ());
58
- boolean isValidSubset = subsets .size () == 0 ;
59
- for (String subset : subsets ) {
60
- isValidSubset = checkJavaVersion (subset );
61
- if (isValidSubset ) {
55
+ // Do not generate make target if version doesn't match the exported jdk_version
56
+ List <String > versions = new ArrayList <String >();
57
+ getElements (versions , "versions" , "version" , null , ti .getTestCaseName ());
58
+ //TODO: remove temporarily support for old style
59
+ if (versions .size () == 0 ) {
60
+ getElements (versions , "subsets" , "subset" , null , ti .getTestCaseName ());
61
+ }
62
+ boolean isValidVersion = versions .size () == 0 ;
63
+ for (String version : versions ) {
64
+ isValidVersion = checkJavaVersion (version );
65
+ if (isValidVersion ) {
62
66
break ;
63
67
}
64
68
}
65
- if (!isValidSubset ) return null ;
69
+ if (!isValidVersion ) return null ;
66
70
67
71
// Do not generate make target if the test is AOT not applicable when test flag
68
72
// is set to AOT
@@ -189,14 +193,18 @@ private void parseDisableInfo(TestInfo ti) {
189
193
190
194
String impl = getDisabledEle (disabled , "impl" , ti .getTestCaseName ());
191
195
String vendor = getDisabledEle (disabled , "vendor" , ti .getTestCaseName ());
192
- String subset = getDisabledEle (disabled , "subset" , ti .getTestCaseName ());
196
+ String version = getDisabledEle (disabled , "version" , ti .getTestCaseName ());
197
+ //TODO: remove temporarily support for old style
198
+ if (version == null ) {
199
+ version = getDisabledEle (disabled , "subset" , ti .getTestCaseName ());
200
+ }
193
201
String plat = getDisabledEle (disabled , "plat" , ti .getTestCaseName ());
194
202
String variation = getDisabledEle (disabled , "variation" , ti .getTestCaseName ());
195
203
196
204
for (Variation var : ti .getVars ()) {
197
205
if (((impl == null ) || arg .getImpl ().equals (impl ))
198
206
&& ((vendor == null ) || arg .getVendor ().equals (vendor ))
199
- && ((subset == null ) || checkJavaVersion (subset ))
207
+ && ((version == null ) || checkJavaVersion (version ))
200
208
&& ((plat == null ) || checkPlat (plat ))
201
209
&& ((variation == null ) || var .getVariation ().equals (variation ))) {
202
210
var .addDisabledReasons (comment );
0 commit comments