@@ -61,12 +61,6 @@ def initializeEnvironment() {
61
61
. ${JABBA_SHELL}
62
62
jabba which 1.8''' , returnStdout : true ). trim()
63
63
64
- env. TEST_JAVA_HOME = sh(label : ' Get TEST_JAVA_HOME' ,script : ''' #!/bin/bash -le
65
- . ${JABBA_SHELL}
66
- jabba which ${JABBA_VERSION}''' , returnStdout : true ). trim()
67
- env. TEST_JAVA_VERSION = sh(label : ' Get TEST_JAVA_VERSION' ,script : ''' #!/bin/bash -le
68
- echo "${JABBA_VERSION##*.}"''' , returnStdout : true ). trim()
69
-
70
64
sh label : ' Download Apache CassandraⓇ or DataStax Enterprise' ,script : ''' #!/bin/bash -le
71
65
. ${JABBA_SHELL}
72
66
jabba use 1.8
@@ -115,7 +109,12 @@ def buildDriver(jabbaVersion) {
115
109
}
116
110
117
111
def executeTests () {
118
- sh label : ' Execute tests' , script : ''' #!/bin/bash -le
112
+ def testJavaHome = sh(label : ' Get TEST_JAVA_HOME' ,script : ''' #!/bin/bash -le
113
+ . ${JABBA_SHELL}
114
+ jabba which ${JABBA_VERSION}''' , returnStdout : true ). trim()
115
+ def testJavaVersion = (JABBA_VERSION =~ / .*\. (\d +)/ )[0 ][1 ]
116
+
117
+ def executeTestScript = ''' #!/bin/bash -le
119
118
# Load CCM environment variables
120
119
set -o allexport
121
120
. ${HOME}/environment.txt
@@ -137,8 +136,8 @@ def executeTests() {
137
136
printenv | sort
138
137
139
138
mvn -B -V ${INTEGRATION_TESTS_FILTER_ARGUMENT} -T 1 verify \
140
- -Ptest-jdk-${TEST_JAVA_VERSION} \
141
- -DtestJavaHome=${TEST_JAVA_HOME} \
139
+ -Ptest-jdk-''' + testJavaVersion + ''' \
140
+ -DtestJavaHome=''' + testJavaHome + ''' \
142
141
-DfailIfNoTests=false \
143
142
-Dmaven.test.failure.ignore=true \
144
143
-Dmaven.javadoc.skip=${SKIP_JAVADOCS} \
@@ -149,6 +148,8 @@ def executeTests() {
149
148
${ISOLATED_ITS_ARGUMENT} \
150
149
${PARALLELIZABLE_ITS_ARGUMENT}
151
150
'''
151
+ echo " Invoking Maven with parameters test-jdk-${ testJavaVersion} and testJavaHome = ${ testJavaHome} "
152
+ sh label : ' Execute tests' , script : executeTestScript
152
153
}
153
154
154
155
def executeCodeCoverage () {
0 commit comments