Skip to content

Commit d9e6468

Browse files
committed
attempt to fix tests
1 parent 13da826 commit d9e6468

File tree

6 files changed

+41
-3
lines changed

6 files changed

+41
-3
lines changed

.evergreen/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@ axes:
13681368
- id: "tls-rustls"
13691369
display_name: "Rustls"
13701370
variables:
1371-
TLS_FEATURE: "rustls-tls"
1371+
TLS_FEATURE: ""
13721372
- id: "tls-openssl"
13731373
display_name: "OpenSSL"
13741374
variables:

.evergreen/env.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ if [[ "$OS" == "Windows_NT" ]]; then
1414
export NVM_SYMLINK
1515
NVM_ARTIFACTS_PATH=$(cygpath -w "$NODE_ARTIFACTS_PATH/bin")
1616
export NVM_ARTIFACTS_PATH
17+
export OPENSSL_DIR="C:\\openssl"
18+
OPENSSL_LIB_PATH=$(cygpath $OPENSSL_DIR/lib)
19+
ls $OPENSSL_LIB_PATH
1720
PATH=$(cygpath $NVM_SYMLINK):$(cygpath $NVM_HOME):$PATH
1821
export PATH
1922
echo "updated path on windows PATH=$PATH"

.evergreen/run-async-std-tests.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

33
set -o errexit
4+
set -o pipefail
45

56
source ./.evergreen/env.sh
67

@@ -12,11 +13,18 @@ fi
1213

1314
echo "cargo test options: ${OPTIONS}"
1415

16+
set +o errexit
17+
CARGO_EXIT=0
18+
1519
RUST_BACKTRACE=1 cargo test --no-default-features --features async-std-runtime $OPTIONS | tee async-tests.json
20+
(( CARGO_EXIT = CARGO_EXIT || $? ))
1621
cat async-tests.json | cargo2junit > async-tests.xml
1722
RUST_BACKTRACE=1 cargo test sync --no-default-features --features sync $OPTIONS | tee sync-tests.json
23+
(( CARGO_EXIT = CARGO_EXIT || $? ))
1824
cat sync-tests.json | cargo2junit > sync-tests.xml
1925
RUST_BACKTRACE=1 cargo test --doc sync --no-default-features --features sync $OPTIONS | tee sync-doc-tests.json
26+
(( CARGO_EXIT = CARGO_EXIT || $? ))
2027
cat sync-doc-tests.json | cargo2junit > sync-doc-tests.xml
2128

2229
junit-report-merger results.xml async-tests.xml sync-tests.xml sync-doc-tests.xml
30+
exit $CARGO_EXIT

.evergreen/run-serverless-tests.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22

33
set -o errexit
4+
set -o pipefail
45

56
source ./.evergreen/env.sh
67

@@ -29,13 +30,26 @@ cargo_test() {
2930
cargo test ${DEFAULT_FEATURES} --features $FEATURE_FLAGS $1 $OPTIONS | cargo2junit
3031
}
3132

33+
set +o errexit
34+
CARGO_EXIT=0
35+
3236
cargo_test test::spec::crud > crud.xml
37+
(( CARGO_EXIT = CARGO_EXIT || $? ))
3338
cargo_test test::spec::retryable_reads > retryable_reads.xml
39+
(( CARGO_EXIT = CARGO_EXIT || $? ))
3440
cargo_test test::spec::retryable_writes > retryable_writes.xml
41+
(( CARGO_EXIT = CARGO_EXIT || $? ))
3542
cargo_test test::spec::versioned_api > versioned_api.xml
43+
(( CARGO_EXIT = CARGO_EXIT || $? ))
3644
cargo_test test::spec::sessions > sessions.xml
45+
(( CARGO_EXIT = CARGO_EXIT || $? ))
3746
cargo_test test::spec::transactions > transactions.xml
47+
(( CARGO_EXIT = CARGO_EXIT || $? ))
3848
cargo_test test::spec::load_balancers > load_balancers.xml
49+
(( CARGO_EXIT = CARGO_EXIT || $? ))
3950
cargo_test test::cursor > cursor.xml
51+
(( CARGO_EXIT = CARGO_EXIT || $? ))
52+
53+
junit-report-merger results.xml crud.xml retryable_reads.xml retryable_writes.xml versioned_api.xml sessions.xml transactions.xml load_balancers.xml cursor.xml
4054

41-
junit-report-merger results.xml crud.xml retryable_reads.xml retryable_writes.xml versioned_api.xml sessions.xml transactions.xml load_balancers.xml cursor.xml
55+
exit $CARGO_EXIT

.evergreen/run-tokio-tests.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

33
set -o errexit
4+
set -o pipefail
45

56
source ./.evergreen/env.sh
67

@@ -14,11 +15,19 @@ FEATURE_FLAGS="zstd-compression,snappy-compression,zlib-compression"
1415

1516
echo "cargo test options: --features $FEATURE_FLAGS ${OPTIONS}"
1617

18+
set +o errexit
19+
CARGO_EXIT=$?
20+
1721
RUST_BACKTRACE=1 cargo test --features $FEATURE_FLAGS $OPTIONS | tee results.json
22+
(( CARGO_EXIT = $CARGO_EXIT || $? ))
1823
cat results.json | cargo2junit > async-tests.xml
1924
RUST_BACKTRACE=1 cargo test sync --features tokio-sync,$FEATURE_FLAGS $OPTIONS | tee sync-tests.json
25+
(( CARGO_EXIT = $CARGO_EXIT || $? ))
2026
cat sync-tests.json | cargo2junit > sync-tests.xml
2127
RUST_BACKTRACE=1 cargo test --doc sync --features tokio-sync,$FEATURE_FLAGS $OPTIONS | tee sync-doc-tests.json
28+
(( CARGO_EXIT = $CARGO_EXIT || $? ))
2229
cat sync-doc-tests.json | cargo2junit > sync-doc-tests.xml
2330

2431
junit-report-merger results.xml async-tests.xml sync-tests.xml sync-doc-tests.xml
32+
33+
exit $CARGO_EXIT

.evergreen/run-x509-tests.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
set -o errexit
44
set -o xtrace
5+
set -o pipefail
56

6-
. ~/.cargo/env
7+
source ./.evergreen/env.sh
78

89
export SUBJECT=`openssl x509 -subject -nameopt RFC2253 -noout -inform PEM -in $CERT_PATH`
910

@@ -24,5 +25,8 @@ fi
2425

2526
OPTIONS="--no-default-features --features ${RUNTIME_FEATURE},${TLS_FEATURE} -- -Z unstable-options --format json --report-time"
2627

28+
set +o errexit
2729
RUST_BACKTRACE=1 MONGO_X509_USER="$SUBJECT" cargo test x509 $OPTIONS | tee results.json
30+
CARGO_EXIT=$?
2831
cat results.json | cargo2junit > results.xml
32+
exit $CARGO_EXIT

0 commit comments

Comments
 (0)