Skip to content

Commit 76a14df

Browse files
committed
Skip testing empty metadata
1 parent 40992cc commit 76a14df

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/tck-build-logic/src/main/groovy/org/graalvm/internal/tck/harness/MetadataLookupLogic.groovy

+7-2
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,17 @@ class MetadataLookupLogic {
119119
def metadataIndex = extractJsonFile(index)
120120

121121
for (def entry in metadataIndex) {
122+
List<String> coordinates = splitCoordinates((String) entry["module"])
122123
List<String> testedVersions = entry["tested-versions"] as List<String>
123124
if (coordinatesMatch((String) entry["module"], groupId, artifactId) && (version == null || testedVersions.contains(version))) {
124125
if (version == null) { // We want all library versions, so let's add them.
125-
testedVersions.stream().forEach(t -> matchingCoordinates.add("${entry["module"]}:${t}"))
126+
testedVersions.stream()
127+
.filter(t -> metadataRoot.resolve(coordinates.get(0)).resolve(coordinates.get(1)).resolve(t).toFile().exists())
128+
.forEach(t -> matchingCoordinates.add("${entry["module"]}:${t}"))
126129
} else { // We have a specific version pinned.
127-
matchingCoordinates.add("${entry["module"]}:${version}")
130+
if (metadataRoot.resolve(coordinates.get(0)).resolve(coordinates.get(1)).resolve(version).toFile().exists()) {
131+
matchingCoordinates.add("${entry["module"]}:${version}")
132+
}
128133
}
129134
}
130135
}

0 commit comments

Comments
 (0)