Skip to content

Commit 491dad7

Browse files
committed
Make GRAALPYTHON_RESOURCES a runtime dependency of PYTHON_COMMUNITY and distDependency of the JUnit tests
1 parent b8241db commit 491dad7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PythonContext.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2298,6 +2298,9 @@ private static boolean hasAllowedSuffix(TruffleString path, TruffleString[] allo
22982298
int pathLen = path.codePointLengthUncached(TS_ENCODING);
22992299
for (TruffleString suffix : allowedSuffixes) {
23002300
int suffixLen = suffix.codePointLengthUncached(TS_ENCODING);
2301+
if (suffixLen > pathLen) {
2302+
continue;
2303+
}
23012304
if (path.regionEqualsUncached(pathLen - suffixLen, suffix, 0, suffixLen, TS_ENCODING)) {
23022305
return true;
23032306
}

mx.graalpython/suite.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,7 @@
997997
"type": "pom",
998998
"runtimeDependencies": [
999999
"GRAALPYTHON",
1000+
"GRAALPYTHON_RESOURCES",
10001001
"truffle:TRUFFLE_RUNTIME",
10011002
],
10021003
"description": "GraalPython engine.",
@@ -1030,6 +1031,7 @@
10301031
"exclude": ["mx:JUNIT"],
10311032
"distDependencies": [
10321033
"GRAALPYTHON",
1034+
"GRAALPYTHON_RESOURCES",
10331035
"GRAALPYTHON-LAUNCHER",
10341036
"truffle:TRUFFLE_TCK",
10351037
],

0 commit comments

Comments
 (0)