diff --git a/.evergreen/cargo-test.sh b/.evergreen/cargo-test.sh index efd2865ae..d9544d19b 100644 --- a/.evergreen/cargo-test.sh +++ b/.evergreen/cargo-test.sh @@ -29,7 +29,12 @@ cargo_test() { TAIL_PID=$! LOG_UNCAPTURED=${LOG_PATH} RUST_BACKTRACE=1 cargo nextest run --profile ci $(cargo_test_options $1) ((CARGO_RESULT = ${CARGO_RESULT} || $?)) - mv target/nextest/ci/junit.xml $2 + if [[ -f "results.xml" ]]; then + mv results.xml previous.xml + merge-junit -o results.xml previous.xml target/nextest/ci/junit.xml + else + mv target/nextest/ci/junit.xml results.xml + fi kill ${TAIL_PID} rm ${LOG_PATH} } diff --git a/.evergreen/config.yml b/.evergreen/config.yml index f6922649a..152ca48cf 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1571,16 +1571,23 @@ functions: params: working_dir: src shell: bash - add_expansions_to_env: true + include_expansions_in_env: + - DRIVERS_TOOLS + - PROJECT_DIRECTORY + - MONGODB_URI + - MONGOCRYPT_LIB_DIR + - OPENSSL + - OS + - LD_LIBRARY_PATH + - AWS_ACCESS_KEY_ID + - AWS_SECRET_ACCESS_KEY + - CSFLE_LOCAL_KEY + - CRYPT_SHARED_LIB_PATH + - DISABLE_CRYPT_SHARED + - AZURE_IMDS_MOCK_PORT + - SERVERLESS_ATLAS_USER + - SERVERLESS_ATLAS_PASSWORD script: | - ${PREPARE_SHELL} - - # Exported without xtrace to avoid leaking credentials - set +o xtrace - export SERVERLESS_ATLAS_USER=${SERVERLESS_ATLAS_USER} - export SERVERLESS_ATLAS_PASSWORD=${SERVERLESS_ATLAS_PASSWORD} - set -o xtrace - export SINGLE_MONGOS_LB_URI=${SERVERLESS_URI} . .evergreen/generate-uri.sh export SERVERLESS=serverless diff --git a/.evergreen/run-atlas-tests.sh b/.evergreen/run-atlas-tests.sh index 2ebfaaf45..ec36cdcaf 100755 --- a/.evergreen/run-atlas-tests.sh +++ b/.evergreen/run-atlas-tests.sh @@ -12,6 +12,6 @@ source "${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh" drivers/a set +o errexit -cargo_test atlas_connectivity results.xml +cargo_test atlas_connectivity exit $CARGO_RESULT diff --git a/.evergreen/run-aws-tests.sh b/.evergreen/run-aws-tests.sh index 976018c02..eb743bbb7 100755 --- a/.evergreen/run-aws-tests.sh +++ b/.evergreen/run-aws-tests.sh @@ -18,12 +18,10 @@ FEATURE_FLAGS+=("aws-auth") set +o errexit -cargo_test auth_aws auth_aws.xml -cargo_test lambda_examples::auth::test_handler lambda_handler.xml -cargo_test spec::auth spec.xml -cargo_test uri_options uri_options.xml -cargo_test connection_string connection_string.xml - -merge-junit -o results.xml auth_aws.xml lambda_handler.xml spec.xml uri_options.xml connection_string.xml +cargo_test auth_aws +cargo_test lambda_examples::auth::test_handler +cargo_test spec::auth +cargo_test uri_options +cargo_test connection_string exit $CARGO_RESULT diff --git a/.evergreen/run-connection-string-tests.sh b/.evergreen/run-connection-string-tests.sh index c1a7a11d1..214041f9c 100755 --- a/.evergreen/run-connection-string-tests.sh +++ b/.evergreen/run-connection-string-tests.sh @@ -11,10 +11,8 @@ FEATURE_FLAGS+=("aws-auth") set +o errexit -cargo_test spec::auth spec.xml -cargo_test uri_options uri_options.xml -cargo_test connection_string connection_string.xml - -merge-junit -o results.xml spec.xml uri_options.xml connection_string.xml +cargo_test spec::auth +cargo_test uri_options +cargo_test connection_string exit ${CARGO_RESULT} diff --git a/.evergreen/run-csfle-tests.sh b/.evergreen/run-csfle-tests.sh index d5039b02b..9020aab30 100755 --- a/.evergreen/run-csfle-tests.sh +++ b/.evergreen/run-csfle-tests.sh @@ -26,14 +26,12 @@ fi set +o errexit -cargo_test test::csfle prose.xml -cargo_test test::spec::client_side_encryption spec.xml +cargo_test test::csfle +cargo_test test::spec::client_side_encryption # Unset variables for on-demand credential failure tests. unset AWS_ACCESS_KEY_ID unset AWS_SECRET_ACCESS_KEY -cargo_test test::csfle::on_demand_aws_failure failure.xml - -merge-junit -o results.xml prose.xml spec.xml failure.xml +cargo_test test::csfle::on_demand_aws_failure exit ${CARGO_RESULT} diff --git a/.evergreen/run-plain-tests.sh b/.evergreen/run-plain-tests.sh index 10b5910d5..50f024df5 100755 --- a/.evergreen/run-plain-tests.sh +++ b/.evergreen/run-plain-tests.sh @@ -8,6 +8,6 @@ source .evergreen/cargo-test.sh set +o errexit -MONGO_PLAIN_AUTH_TEST=1 cargo_test plain results.xml +MONGO_PLAIN_AUTH_TEST=1 cargo_test plain exit $CARGO_RESULT diff --git a/.evergreen/run-search-index-test.sh b/.evergreen/run-search-index-test.sh index e463782a3..d350f5eb7 100644 --- a/.evergreen/run-search-index-test.sh +++ b/.evergreen/run-search-index-test.sh @@ -13,6 +13,6 @@ export INDEX_MANAGEMENT_TEST_PROSE=1 set +o errexit -cargo_test test::spec::index_management results.xml +cargo_test test::spec::index_management exit ${CARGO_RESULT} \ No newline at end of file diff --git a/.evergreen/run-serverless-tests.sh b/.evergreen/run-serverless-tests.sh index af5341b43..acf06e4a4 100755 --- a/.evergreen/run-serverless-tests.sh +++ b/.evergreen/run-serverless-tests.sh @@ -10,17 +10,15 @@ export SERVERLESS="serverless" set +o errexit -cargo_test test::spec::crud crud.xml -cargo_test test::spec::retryable_reads retryable_reads.xml -cargo_test test::spec::retryable_writes retryable_writes.xml -cargo_test test::spec::versioned_api versioned_api.xml -cargo_test test::spec::sessions sessions.xml -cargo_test test::spec::transactions transactions.xml -cargo_test test::spec::load_balancers load_balancers.xml -cargo_test test::cursor cursor.xml -cargo_test test::spec::collection_management coll.xml -cargo_test test::spec::command_monitoring_unified monitoring.xml - -merge-junit -o results.xml crud.xml retryable_reads.xml retryable_writes.xml versioned_api.xml sessions.xml transactions.xml load_balancers.xml cursor.xml coll.xml monitoring.xml +cargo_test test::spec::crud +cargo_test test::spec::retryable_reads +cargo_test test::spec::retryable_writes +cargo_test test::spec::versioned_api +cargo_test test::spec::sessions +cargo_test test::spec::transactions +cargo_test test::spec::load_balancers +cargo_test test::cursor +cargo_test test::spec::collection_management +cargo_test test::spec::command_monitoring_unified exit $CARGO_RESULT diff --git a/.evergreen/run-sync-tests.sh b/.evergreen/run-sync-tests.sh index dcbddd843..ba47fe961 100644 --- a/.evergreen/run-sync-tests.sh +++ b/.evergreen/run-sync-tests.sh @@ -12,6 +12,6 @@ echo "cargo test options: $(cargo_test_options)" set +o errexit -cargo_test sync results.xml +cargo_test sync exit $CARGO_RESULT diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 41df7ef0d..2ccc78ee3 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -31,7 +31,7 @@ echo "cargo test options: $(cargo_test_options)" set +o errexit -cargo_test "" results.xml +cargo_test "" # cargo-nextest doesn't support doc tests RUST_BACKTRACE=1 cargo test --doc $(cargo_test_options) diff --git a/.evergreen/run-x509-tests.sh b/.evergreen/run-x509-tests.sh index a3f48d347..1089783e1 100755 --- a/.evergreen/run-x509-tests.sh +++ b/.evergreen/run-x509-tests.sh @@ -17,6 +17,6 @@ export SUBJECT=$(echo "$SUBJECT" | awk '{$1=$1;print}') set +o errexit -MONGO_X509_USER="$SUBJECT" cargo_test x509_auth results.xml +MONGO_X509_USER="$SUBJECT" cargo_test x509_auth exit ${CARGO_RESULT} diff --git a/src/test/spec/json/client-side-encryption/legacy/fle2v2-Rangev2-Compact.json b/src/test/spec/json/client-side-encryption/legacy/fle2v2-Rangev2-Compact.json index 59241927c..bba9f2553 100644 --- a/src/test/spec/json/client-side-encryption/legacy/fle2v2-Rangev2-Compact.json +++ b/src/test/spec/json/client-side-encryption/legacy/fle2v2-Rangev2-Compact.json @@ -6,7 +6,8 @@ "replicaset", "sharded", "load-balanced" - ] + ], + "serverless": "forbid" } ], "database_name": "default", diff --git a/src/test/spec/json/client-side-encryption/legacy/fle2v2-Rangev2-Compact.yml b/src/test/spec/json/client-side-encryption/legacy/fle2v2-Rangev2-Compact.yml index 4a36409d3..d49c084ef 100644 --- a/src/test/spec/json/client-side-encryption/legacy/fle2v2-Rangev2-Compact.yml +++ b/src/test/spec/json/client-side-encryption/legacy/fle2v2-Rangev2-Compact.yml @@ -3,6 +3,7 @@ runOn: - minServerVersion: "8.0.0" # Require range v2 support on server. # FLE 2 Encrypted collections are not supported on standalone. topology: [ "replicaset", "sharded", "load-balanced" ] + serverless: forbid # Skip on serverless until CLOUDP-267864 is resolved. database_name: "default" collection_name: &collection_name "default" data: []