Skip to content

Commit 764b3d5

Browse files
committed
Run LibraryFactory.resetNativeImageState(...) only in regular builds
1 parent ed3797c commit 764b3d5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleBaseFeature.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,10 @@ public void cleanup() {
486486
Collections.emptyList());
487487
invokeStaticMethod("com.oracle.truffle.api.impl.ThreadLocalHandshake", "resetNativeImageState",
488488
Collections.emptyList());
489-
invokeStaticMethod("com.oracle.truffle.api.library.LibraryFactory", "resetNativeImageState",
490-
Collections.singletonList(ClassLoader.class), imageClassLoader);
489+
if (System.getProperty("substratevm.svmtest") == null) {
490+
invokeStaticMethod("com.oracle.truffle.api.library.LibraryFactory", "resetNativeImageState",
491+
Collections.singletonList(ClassLoader.class), imageClassLoader);
492+
}
491493
invokeStaticMethod("com.oracle.truffle.api.source.Source", "resetNativeImageState", Collections.emptyList());
492494
}
493495

0 commit comments

Comments
 (0)