Skip to content

Commit

Permalink
Append Java version to sharedClassesDataDir
Browse files Browse the repository at this point in the history
- updates the directory structure to include the Java version in the sharedClassesDataDir path.

closes: eclipse-openj9/openj9#19582

Signed-off-by: Anna Babu Palathingal <[email protected]>
  • Loading branch information
annaibm committed Jun 4, 2024
1 parent 0cc1cdb commit b592312
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ public void setUp(StfCoreExtension test, StfSharedClassesExtension sharedClasses
// See whether the test data (20000 classes and jars) already exist.
// If not, create them in the first -systemtest-prereqs directory (or the default location if no -systemtest-prereqs were supplied).
DirectoryRef sharedClassesDataDir = null; // This will be initialised when we find it.
String dataSubdir = "sharedClassesTestData/v1";
String javaVersion = System.getProperty("java.version");
String[] versionStrings = javaVersion.split("\\D+", 2); // Split at the first non-digit, limit to 2 parts
int majorVersion = Integer.parseInt(versionStrings[0]); // The first part will be the major version number
String dataSubdir = "sharedClassesTestData/v1" + "/" + majorVersion;
ArrayList<DirectoryRef> prereqRoots = test.env().getPrereqRoots();
int found = 0;
for (int i = 0 ; (i < prereqRoots.size()) && ( found == 0 ); i++ ) {
Expand Down

0 comments on commit b592312

Please sign in to comment.