Skip to content

Commit

Permalink
Removed the getPrereqRoots function
Browse files Browse the repository at this point in the history
- SharedClasses tests to generate related classes under workspace dir - with getResultsDir function instead of getPrereqRoots.

related:eclipse-openj9/openj9#19582

Signed-off-by: Anna Babu Palathingal <[email protected]>
  • Loading branch information
annaibm committed May 31, 2024
1 parent 0cc1cdb commit 87a6fea
Showing 1 changed file with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,21 +187,23 @@ public void setUp(StfCoreExtension test, StfSharedClassesExtension sharedClasses
// 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";
ArrayList<DirectoryRef> prereqRoots = test.env().getPrereqRoots();
System.out.println("Test Roots: " + test.env().getTestRoots());
System.out.println("Temporary Directory: " + test.env().getTmpDir());
System.out.println("Results Directory: " + test.env().getResultsDir());
System.out.println("Prereqroot Directory " + test.env().getPrereqRoots());
DirectoryRef prereqRoots = test.env().getResultsDir();
int found = 0;
for (int i = 0 ; (i < prereqRoots.size()) && ( found == 0 ); i++ ) {
sharedClassesDataDir = prereqRoots.get(i).childDirectory(dataSubdir);
if (!sharedClassesDataDir.exists()) {
System.out.println(sharedClassesDataDir.getSpec() + " does not exist");
}
else {
System.out.println(sharedClassesDataDir.getSpec() + " exists");
found = 1;
}
sharedClassesDataDir = prereqRoots.childDirectory(dataSubdir);
if (!sharedClassesDataDir.exists()) {
System.out.println(sharedClassesDataDir.getSpec() + " does not exist");
}
else {
System.out.println(sharedClassesDataDir.getSpec() + " exists");
found = 1;
}

if ( found == 0 ) {
sharedClassesDataDir = prereqRoots.get(0).childDirectory(dataSubdir);
sharedClassesDataDir = prereqRoots.childDirectory(dataSubdir);
test.doRunForegroundProcess("Create Shared Classes jars",
"CSC",
ECHO_ON,
Expand Down

0 comments on commit 87a6fea

Please sign in to comment.