Skip to content

Commit

Permalink
(chore) pass pcre2.library.* system-properties for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-pelykh committed Jun 28, 2024
1 parent e6d7f55 commit d8b1203
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ffm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,24 @@ tasks.withType<JavaCompile> {
tasks.test {
useJUnitPlatform()
jvmArgs("--enable-preview")

systemProperty(
"java.library.path", listOf(
System.getProperty("pcre2.library.path"),
System.getProperty("java.library.path")
).joinToString(":")
)

val pcre2LibraryName = System.getProperty("pcre2.library.name")
if (pcre2LibraryName != null) {
systemProperty("pcre2.library.name", pcre2LibraryName)
}

val pcre2FunctionSuffix = System.getProperty("pcre2.function.suffix")
if (pcre2FunctionSuffix != null) {
systemProperty("pcre2.function.suffix", pcre2FunctionSuffix)
}

finalizedBy(tasks.jacocoTestReport)
}

Expand Down
12 changes: 12 additions & 0 deletions jna/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,24 @@ java {

tasks.withType<Test> {
useJUnitPlatform()

systemProperty(
"jna.library.path", listOf(
System.getProperty("pcre2.library.path"),
System.getProperty("jna.library.path")
).joinToString(":")
)

val pcre2LibraryName = System.getProperty("pcre2.library.name")
if (pcre2LibraryName != null) {
systemProperty("pcre2.library.name", pcre2LibraryName)
}

val pcre2FunctionSuffix = System.getProperty("pcre2.function.suffix")
if (pcre2FunctionSuffix != null) {
systemProperty("pcre2.function.suffix", pcre2FunctionSuffix)
}

finalizedBy(tasks.jacocoTestReport)
}

Expand Down
13 changes: 13 additions & 0 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,31 @@ java {
tasks.test {
useJUnitPlatform()
jvmArgs("--enable-preview")

systemProperty(
"jna.library.path", listOf(
System.getProperty("pcre2.library.path"),
System.getProperty("jna.library.path")
).joinToString(":")
)

systemProperty(
"java.library.path", listOf(
System.getProperty("pcre2.library.path"),
System.getProperty("java.library.path")
).joinToString(":")
)

val pcre2LibraryName = System.getProperty("pcre2.library.name")
if (pcre2LibraryName != null) {
systemProperty("pcre2.library.name", pcre2LibraryName)
}

val pcre2FunctionSuffix = System.getProperty("pcre2.function.suffix")
if (pcre2FunctionSuffix != null) {
systemProperty("pcre2.function.suffix", pcre2FunctionSuffix)
}

finalizedBy(tasks.jacocoTestReport)
}

Expand Down
13 changes: 13 additions & 0 deletions regex/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,31 @@ java {
tasks.test {
useJUnitPlatform()
jvmArgs("--enable-preview")

systemProperty(
"jna.library.path", listOf(
System.getProperty("pcre2.library.path"),
System.getProperty("jna.library.path")
).joinToString(":")
)

systemProperty(
"java.library.path", listOf(
System.getProperty("pcre2.library.path"),
System.getProperty("java.library.path")
).joinToString(":")
)

val pcre2LibraryName = System.getProperty("pcre2.library.name")
if (pcre2LibraryName != null) {
systemProperty("pcre2.library.name", pcre2LibraryName)
}

val pcre2FunctionSuffix = System.getProperty("pcre2.function.suffix")
if (pcre2FunctionSuffix != null) {
systemProperty("pcre2.function.suffix", pcre2FunctionSuffix)
}

finalizedBy(tasks.jacocoTestReport)
}

Expand Down

0 comments on commit d8b1203

Please sign in to comment.