-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle missing classes.jar in sharedClassesTestData #162
Conversation
Grinder runs:
After change:
|
FileRef sharedClassesJar = sharedClassesDataDir.childFile("classes.jar"); | ||
if (sharedClassesJar.exists()) { | ||
System.out.println(sharedClassesDataDir.getSpec() + " exists and contains classes.jar"); | ||
found = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
break the loop if found
Path sharedClassesDataDirPath = sharedClassesDataDir.asJavaFile().toPath(); | ||
removeAllContentsAndDeleteDir(sharedClassesDataDirPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need line 212 and 213?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines were added to ensure that the directory sharedClassesDataDir
and all its contents are deleted before proceeding with the creation of source files and classes.jar.Otherwise it was resulting in an exception as shown below:
https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/45365/consoleFull
Generating jar files in /home/jenkins/testDependency/system_lib/sharedClassesTestData/v1/jdk11
11:45:36 CSC 02/12/24 08:45:36: Creating source files
11:45:36 CSC stderr Exception in thread "main" java.lang.RuntimeException: Failed to create destination directory for source files
11:45:36 CSC stderr at net.openj9.test.sc.JavaGen.makeJavas(JavaGen.java:132)
11:45:36 CSC stderr at net.openj9.test.sc.JavaGen.go(JavaGen.java:100)
11:45:36 CSC stderr at net.openj9.test.sc.JavaGen.main(JavaGen.java:94)
11:45:36 STF 08:45:36.289 - **FAILED** Process CSC ended with exit code (1) and not the expected exit code/s (0)
11:45:36 STF 08:45:36.289 - Monitoring Report Summary:
Thinking it might be due to corrupt or residual files already present in the directory.
openj9.test.sharedClasses/src/test.sharedClasses/net/openj9/stf/SharedClasses.java
Outdated
Show resolved
Hide resolved
f887dff
to
a21d256
Compare
System.out.println(sharedClassesDataDir.getSpec() + " exists"); | ||
FileRef sharedClassesJar = sharedClassesDataDir.childFile("classes.jar"); | ||
if (sharedClassesJar.exists()) { | ||
System.out.println(sharedClassesDataDir.getSpec() + " exists and contains classes.jar"); | ||
found = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please break here
ee6468b
to
6864d0d
Compare
In PR description, please change the keyword |
6864d0d
to
9960dde
Compare
} | ||
break; | ||
} else { | ||
System.out.println(sharedClassesDataDir.getSpec() + " exists but classes.jar does not exist"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change it to sharedClassesDataDir.getSpec() + "/classes.jar does not exist
.
- ensure the presence of classes.jar , if doesnt exist regenerate it. resolves: eclipse-openj9/openj9#19582 Signed-off-by: Anna Babu Palathingal <[email protected]>
ba9e861
to
a0c6914
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
resolves: eclipse-openj9/openj9#19582