Skip to content

Commit

Permalink
Include integration tests in windows workflow (#624) (#625)
Browse files Browse the repository at this point in the history
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
(cherry picked from commit e36c232)
  • Loading branch information
opensearch-trigger-bot[bot] committed Jan 9, 2023
1 parent 929221e commit 2568c18
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

- name: Build with Gradle
run: |
./gradlew.bat build -x integTest -x jacocoTestReport
./gradlew.bat build
- name: Create Artifact Path
run: |
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:

- name: Build with Gradle
run: |
./gradlew build -x integTest -x jacocoTestReport
./gradlew build
- name: Create Artifact Path
run: |
Expand Down
10 changes: 9 additions & 1 deletion build-tools/esplugin-coverage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
* break if there are multiple nodes in the integTestCluster. But for now... it sorta works.
*/

import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'jacoco'

// Get gradle to generate the required jvm agent arg for us using a dummy tasks of type Test. Unfortunately Elastic's
// testing tasks don't derive from Test so the jacoco plugin can't do this automatically.
def jacocoDir = "${buildDir}/jacoco"
Expand Down Expand Up @@ -61,7 +64,12 @@ allprojects{
jacocoTestReport.dependsOn integTest

testClusters.integTest {
jvmArgs " ${dummyIntegTest.jacoco.getAsJvmArg()}".replace('javaagent:','javaagent:/')
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
// Replacing build with absolute path to fix the error "error opening zip file or JAR manifest missing : /build/tmp/expandedArchives/..../jacocoagent.jar"
jvmArgs " ${dummyIntegTest.jacoco.getAsJvmArg()}".replace('build',"${buildDir}")
} else {
jvmArgs " ${dummyIntegTest.jacoco.getAsJvmArg()}".replace('javaagent:','javaagent:/')
}
systemProperty 'com.sun.management.jmxremote', "true"
systemProperty 'com.sun.management.jmxremote.authenticate', "false"
systemProperty 'com.sun.management.jmxremote.port', "7777"
Expand Down

0 comments on commit 2568c18

Please sign in to comment.