@@ -150,7 +150,7 @@ void getSrcVersion() {
150150 return version
151151}
152152
153- def linuxTesting (file , env_name , run_interoperability_tests , network_name , stashBuildResults ) {
153+ def linuxTesting (file , env_name , network_name , stashBuildResults ) {
154154 def poolInst
155155 try {
156156 echo " ${ env_name} Test: Checkout csm"
@@ -168,17 +168,11 @@ def linuxTesting(file, env_name, run_interoperability_tests, network_name, stash
168168 echo " ${ env_name} Test: Test"
169169
170170 try {
171- def featuresArgs = ' '
172- if (run_interoperability_tests) {
173- sh ' chmod -R 777 /home/indy/indy-anoncreds/'
174- featuresArgs = ' --features "interoperability_tests"'
175- }
176-
177171 echo " ${ env_name} Libindy Test: Build"
178- sh " RUST_BACKTRACE=1 cargo test --release $f eaturesArgs --no-run"
172+ sh " RUST_BACKTRACE=1 cargo test --release --no-run"
179173
180174 echo " ${ env_name} Libindy Test: Run tests"
181- sh " RUST_BACKTRACE=1 RUST_LOG=trace RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test --release $f eaturesArgs "
175+ sh " RUST_BACKTRACE=1 RUST_LOG=indy::,zmq= trace RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test --release"
182176
183177 if (stashBuildResults) {
184178 stash includes : ' target/release/libindy.so,target/release/libindy.a' , name : ' LibindyUbuntuBuildResult'
@@ -201,7 +195,7 @@ def linuxTesting(file, env_name, run_interoperability_tests, network_name, stash
201195 testEnv. inside(" --ip=\" 10.0.0.3\" --network=${ network_name} " ) {
202196 echo " ${ env_name} Libindy Test: Test java wrapper"
203197
204- sh " RUST_LOG=trace TEST_POOL_IP=10.0.0.2 mvn clean test"
198+ sh " RUST_LOG=indy::,zmq= trace TEST_POOL_IP=10.0.0.2 mvn clean test"
205199 }
206200 }
207201
@@ -212,7 +206,7 @@ def linuxTesting(file, env_name, run_interoperability_tests, network_name, stash
212206
213207 sh '''
214208 python3.5 -m pip install --user -e .
215- LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH} RUST_LOG=trace TEST_POOL_IP=10.0.0.2 python3.5 -m pytest
209+ LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH} RUST_LOG=indy::,zmq= trace TEST_POOL_IP=10.0.0.2 python3.5 -m pytest
216210 '''
217211 }
218212 }
@@ -240,7 +234,7 @@ def linuxTesting(file, env_name, run_interoperability_tests, network_name, stash
240234 sh " LIBRARY_PATH=./ RUST_BACKTRACE=1 cargo test --release --no-run"
241235
242236 echo " ${ env_name} Indy Cli Test: Run tests"
243- sh ' LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH} RUST_BACKTRACE=1 RUST_LOG=trace RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test --release'
237+ sh ' LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH} RUST_BACKTRACE=1 RUST_LOG=indy::,zmq= trace RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test --release'
244238
245239 if (stashBuildResults) {
246240 stash includes : ' target/release/indy-cli' , name : ' IndyCliUbuntuBuildResult'
@@ -256,104 +250,109 @@ def linuxTesting(file, env_name, run_interoperability_tests, network_name, stash
256250def windowsTesting () {
257251 node(' win2016' ) {
258252 stage(' Windows Test' ) {
259- echo " Windows Test: Checkout scm"
260- checkout scm
253+ def ws_path = " workspace/${ env.JOB_NAME} " . replace(' ' , ' _' )
254+ ws(ws_path) {
255+ try {
256+ echo " Windows Test: Checkout scm"
257+ checkout scm
261258
262- try {
263- echo " Windows Test: Run Indy pool"
264- bat " docker -H $INDY_SDK_SERVER_IP build --build-arg pool_ip=$INDY_SDK_SERVER_IP -f ci/indy-pool.dockerfile -t indy_pool ci"
265- bat " docker -H $INDY_SDK_SERVER_IP run -d --network host --name indy_pool -p 9701-9708:9701-9708 indy_pool"
266259
267- setupRust()
260+ echo " Windows Test: Run Indy pool"
261+ bat " docker -H $INDY_SDK_SERVER_IP build --build-arg pool_ip=$INDY_SDK_SERVER_IP -f ci/indy-pool.dockerfile -t indy_pool ci"
262+ bat " docker -H $INDY_SDK_SERVER_IP run -d --network host --name indy_pool -p 9701-9708:9701-9708 indy_pool"
268263
269- dir(' libindy' ) {
270- echo " Windows Test: Download prebuilt dependencies"
271- bat ' wget -O prebuilt.zip "https://repo.sovrin.org/windows/libindy/deps/indy-sdk-deps.zip"'
272- bat ' unzip prebuilt.zip -d prebuilt'
273-
274- echo " Windows Libindy Test: Build"
275- withEnv([
276- " INDY_PREBUILT_DEPS_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
277- " INDY_CRYPTO_PREBUILT_DEPS_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
278- " MILAGRO_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
279- " LIBZMQ_PREFIX=$WORKSPACE \\ libindy\\ prebuilt" ,
280- " SODIUM_LIB_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
281- " OPENSSL_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
282- " PATH=$WORKSPACE \\ libindy\\ prebuilt\\ lib;$PATH " ,
283- " RUST_BACKTRACE=1"
284- ]) {
285- bat " cargo test --release --no-run"
286-
287- echo " Windows Libindy Test: Run tests"
264+ setupRust()
265+
266+ dir(' libindy' ) {
267+ echo " Windows Test: Download prebuilt dependencies"
268+ bat ' wget -O prebuilt.zip "https://repo.sovrin.org/windows/libindy/deps/indy-sdk-deps.zip"'
269+ bat ' unzip prebuilt.zip -d prebuilt'
270+
271+ echo " Windows Libindy Test: Build"
288272 withEnv([
289- " RUST_TEST_THREADS=1" ,
290- " RUST_LOG=trace" ,
291- " TEST_POOL_IP=$INDY_SDK_SERVER_IP "
273+ " INDY_PREBUILT_DEPS_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
274+ " INDY_CRYPTO_PREBUILT_DEPS_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
275+ " MILAGRO_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
276+ " LIBZMQ_PREFIX=$WORKSPACE \\ libindy\\ prebuilt" ,
277+ " SODIUM_LIB_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
278+ " OPENSSL_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
279+ " PATH=$WORKSPACE \\ libindy\\ prebuilt\\ lib;$PATH " ,
280+ " RUST_BACKTRACE=1"
292281 ]) {
293- bat " cargo test --release"
282+ bat " cargo test --release --no-run"
283+
284+ echo " Windows Libindy Test: Run tests"
285+ withEnv([
286+ " RUST_TEST_THREADS=1" ,
287+ " RUST_LOG=indy::,zmq=trace" ,
288+ " TEST_POOL_IP=$INDY_SDK_SERVER_IP "
289+ ]) {
290+ bat " cargo test --release"
291+ }
294292 }
293+ stash includes : ' target/release/*.dll' , name : ' LibindyWindowsBuildResult'
295294 }
296- stash includes : ' target/release/*.dll' , name : ' LibindyWindowsBuildResult'
297- }
298-
299- dir(' cli' ) {
300- bat " sed -i -e \" s/10\\ .0\\ .0\\ .2/${ INDY_SDK_SERVER_IP} /g\" docker_pool_transactions_genesis"
301-
302- bat " copy $WORKSPACE \\ libindy\\ target\\ release\\ indy.dll $WORKSPACE \\ libindy\\ prebuilt\\ lib"
303- bat " copy $WORKSPACE \\ libindy\\ target\\ release\\ indy.lib $WORKSPACE \\ libindy\\ prebuilt\\ lib"
304295
305- echo " Windows Indy Cli Test: Build"
306- withEnv([
307- " INDY_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
308- " RUST_BACKTRACE=1"
309- ]) {
310- bat " cargo build --release"
296+ dir(' cli' ) {
297+ bat " sed -i -e \" s/10\\ .0\\ .0\\ .2/${ INDY_SDK_SERVER_IP} /g\" docker_pool_transactions_genesis"
311298
312- echo " Windows Indy Cli Test: Build tests "
313- bat " cargo test -- release --no-run "
299+ bat " copy $W ORKSPACE \\ libindy \\ target \\ release \\ indy.dll $W ORKSPACE \\ libindy \\ prebuilt \\ lib "
300+ bat " copy $W ORKSPACE \\ libindy \\ target \\ release\\ indy.lib $W ORKSPACE \\ libindy \\ prebuilt \\ lib "
314301
315- echo " Windows Indy Cli Test: Run tests "
302+ echo " Windows Indy Cli Test: Build "
316303 withEnv([
317- " RUST_TEST_THREADS=1" ,
318- " RUST_LOG=trace" ,
319- " TEST_POOL_IP=$INDY_SDK_SERVER_IP "
304+ " INDY_DIR=$WORKSPACE \\ libindy\\ prebuilt" ,
305+ " RUST_BACKTRACE=1"
320306 ]) {
321- bat " cargo test --release"
307+ bat " cargo build --release"
308+
309+ echo " Windows Indy Cli Test: Build tests"
310+ bat " cargo test --release --no-run"
311+
312+ echo " Windows Indy Cli Test: Run tests"
313+ withEnv([
314+ " RUST_TEST_THREADS=1" ,
315+ " RUST_LOG=indy::,zmq=trace" ,
316+ " TEST_POOL_IP=$INDY_SDK_SERVER_IP "
317+ ]) {
318+ bat " cargo test --release"
319+ }
322320 }
323- }
324321
325- stash includes : ' target/release/indy-cli.exe,target/release/*.dll' , name : ' IndyCliWindowsBuildResult'
326- }
322+ stash includes : ' target/release/indy-cli.exe,target/release/*.dll' , name : ' IndyCliWindowsBuildResult'
323+ }
327324
328- // TODO wrappers testing
325+ // TODO wrappers testing
329326
330- } finally {
331- try {
332- bat " docker -H $INDY_SDK_SERVER_IP stop indy_pool"
333- } catch (ignore) {
334- }
335- try {
336- bat " docker -H $INDY_SDK_SERVER_IP rm indy_pool"
337- } catch (ignore) {
327+ } finally {
328+ try {
329+ bat " docker -H $INDY_SDK_SERVER_IP stop indy_pool"
330+ } catch (ignore) {
331+ }
332+ try {
333+ bat " docker -H $INDY_SDK_SERVER_IP rm indy_pool"
334+ } catch (ignore) {
335+ }
336+ cleanWs()
338337 }
339- step([$class : ' WsCleanup' ])
340338 }
339+ cleanWs()
341340 }
342341 }
343342}
344343
345344def ubuntuTesting () {
346345 node(' ubuntu' ) {
347346 stage(' Ubuntu Test' ) {
348- linuxTesting(" ci/ubuntu.dockerfile ci" , " Ubuntu" , false , " pool_network" , true )
347+ linuxTesting(" ci/ubuntu.dockerfile ci" , " Ubuntu" , " pool_network" , true )
349348 }
350349 }
351350}
352351
353352def rhelTesting () {
354353 node(' ubuntu' ) {
355354 stage(' RedHat Test' ) {
356- linuxTesting(" ci/amazon.dockerfile ci" , " RedHat" , false , " pool_network" , false )
355+ linuxTesting(" ci/amazon.dockerfile ci" , " RedHat" , " pool_network" , false )
357356 }
358357 }
359358}
@@ -672,5 +671,5 @@ def downloadPackagingUtils() {
672671}
673672
674673def setupRust () {
675- sh " rustup default 1.21 .0"
674+ sh " rustup default 1.25 .0"
676675}
0 commit comments