Skip to content

Commit

Permalink
Added :jvm-options-parser subproject to the javaTests task (#15957)
Browse files Browse the repository at this point in the history
Adds a global new task named javaTests which groups both :logstash-core:javaTests and :jvm-options-parser:test to include the JvmOptionParser unit test in javaTests phase.
  • Loading branch information
andsel authored Feb 19, 2024
1 parent e5ca860 commit c30fe46
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ allprojects {
"--add-opens=java.base/java.lang=ALL-UNNAMED",
"--add-opens=java.base/java.util=ALL-UNNAMED"
]
//https://stackoverflow.com/questions/3963708/gradle-how-to-display-test-results-in-the-console-in-real-time
testLogging {
//https://stackoverflow.com/questions/3963708/gradle-how-to-display-test-results-in-the-console-in-real-time
testLogging {
// set options for log level LIFECYCLE
events "passed", "skipped", "failed", "standardOut"
showExceptions true
Expand Down Expand Up @@ -898,6 +898,11 @@ tasks.register("extractBundledJdkVersion", ExtractBundledJdkVersion) {
osName = selectOsType()
}

tasks.register("javaTests") {
dependsOn ":logstash-core:javaTests"
dependsOn ":jvm-options-parser:test"
}

clean {
String jdkVersionFilename = tasks.findByName("extractBundledJdkVersion").outputFilename
delete "${projectDir}/${jdkVersionFilename}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,5 @@ private void verifyOptions(String message, String expected, JvmOptionsParser.Par
private BufferedReader asReader(String s) {
return new BufferedReader(new StringReader(s));
}

}

0 comments on commit c30fe46

Please sign in to comment.