Skip to content

Commit

Permalink
Merge pull request adoptium#160 from LongyuZhang/revert40
Browse files Browse the repository at this point in the history
Revert "Temporarily exclude native sharedClasses tests on Windows"
  • Loading branch information
llxia authored Oct 2, 2024
2 parents 087d63c + d2e6e1e commit 6913ab0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 26 deletions.
5 changes: 0 additions & 5 deletions openj9.test.sharedClasses.jvmti/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,8 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex
<target name="build-no-natives" depends="check-prereqs, build-dependencies, check-prereqs, build-archives">
</target>

<!--Temporarily excluding the native tests from building on Windows
due to : https://github.com/eclipse-openj9/openj9-systemtest/issues/38 -->
<target name="build-natives" depends="check-prereqs, setup-native-build-command, build-natives-windows, build-natives-unix">
</target>

<!-- <target name="build-natives" depends="check-prereqs, setup-native-build-command, build-natives-unix">
</target> -->

<target name="setup-native-build-command">
<echo message="building natives for java-platform ${java_platform}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,28 +209,24 @@ public void execute(StfCoreExtension test, StfSharedClassesExtension sharedClass
.addProjectToClasspath("openj9.test.sharedClasses.jvmti")
.runClass(SharedClassesCacheChecker.class));
} else {
// Temporarily excluding the native tests from running on Windows
// due to: https://github.com/eclipse-openj9/openj9-systemtest/issues/38
if ( !PlatformFinder.isWindows() ) {
// Verify caches using a JVMTI native agent
String nativeExt = PlatformFinder.isWindows() ? ".dll" : ".so";
String nativePrefix = PlatformFinder.isWindows() ? "" : "lib";
FileRef agent = test.env().findTestDirectory("openj9.test.sharedClasses.jvmti/bin/native")
.childDirectory(test.env().getPlatformSimple())
.childFile(nativePrefix + "sharedClasses" + nativeExt);

if (!cacheDir.isEmpty()) {
cacheDir = "," + cacheDir;
}
String agentOptions = "expectedCacheCount=" + apiTest.expectedCacheCount + ","
+ "deleteCaches=true,"
+ "cachePrefix=" + apiTest.name() + cacheDir;

sharedClasses.doVerifyCachesUsingJVMTI(commentPrefix + "Verify caches using JVMTI",
apiTest.name(),
sharedClassesOption,
"-agentpath:" + agent + "=" + agentOptions);
// Verify caches using a JVMTI native agent
String nativeExt = PlatformFinder.isWindows() ? ".dll" : ".so";
String nativePrefix = PlatformFinder.isWindows() ? "" : "lib";
FileRef agent = test.env().findTestDirectory("openj9.test.sharedClasses.jvmti/bin/native")
.childDirectory(test.env().getPlatformSimple())
.childFile(nativePrefix + "sharedClasses" + nativeExt);

if (!cacheDir.isEmpty()) {
cacheDir = "," + cacheDir;
}
String agentOptions = "expectedCacheCount=" + apiTest.expectedCacheCount + ","
+ "deleteCaches=true,"
+ "cachePrefix=" + apiTest.name() + cacheDir;

sharedClasses.doVerifyCachesUsingJVMTI(commentPrefix + "Verify caches using JVMTI",
apiTest.name(),
sharedClassesOption,
"-agentpath:" + agent + "=" + agentOptions);
}
}
}
Expand Down

0 comments on commit 6913ab0

Please sign in to comment.