diff --git a/Cargo.lock b/Cargo.lock index b3d0d1bfc4a..8848eec7002 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2163,9 +2163,9 @@ checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" [[package]] name = "bytemuck" -version = "1.18.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" [[package]] name = "byteorder" @@ -12643,9 +12643,9 @@ dependencies = [ [[package]] name = "roaring" -version = "0.10.6" +version = "0.10.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4b84ba6e838ceb47b41de5194a60244fac43d9fe03b71dbe8c5a201081d6d1" +checksum = "a652edd001c53df0b3f96a36a8dc93fce6866988efc16808235653c6bcac8bf2" dependencies = [ "bytemuck", "byteorder", diff --git a/scripts/ci_tests/rust_tests.sh b/scripts/ci_tests/rust_tests.sh index 86e47dd7904..8b25f68e5f2 100755 --- a/scripts/ci_tests/rust_tests.sh +++ b/scripts/ci_tests/rust_tests.sh @@ -73,12 +73,12 @@ function mk_test_filterset() { FILTERSET="" for crate in ${CHANGED_CRATES[@]}; do # rdeps selects the crate plus all crates that depend on it - add_filter="-E rdeps(${crate})" + add_filter="rdeps(${crate})" if [ -z "$FILTERSET" ]; then FILTERSET="$add_filter" else - FILTERSET="$FILTERSET $add_filter" + FILTERSET="$FILTERSET | $add_filter" fi done @@ -89,6 +89,31 @@ function mk_test_filterset() { echo "${FILTERSET}" } +function mk_exclude_filterset() { + EXCLUDE_SET="" + + # These require extra config which is applied in `tests_using_postgres` below. + # They are excluded from the main tests group, which runs with all features enabled, + # because they will fail due to cross-thread contamination. + EXCLUDED=( + "package(iota-graphql-rpc) & (binary(e2e_tests) | binary(examples_validation_tests) | test(test_query_cost))" + "package(iota-graphql-e2e-tests)" + "package(iota-cluster-test) & binary(local_cluster_test)" + "package(iota-indexer) & (binary(ingestion_tests) | binary(rpc-tests))" + ) + + for item in "${EXCLUDED[@]}"; do + add_filter="!(${item})" + + if [ -z "$EXCLUDE_SET" ]; then + EXCLUDE_SET="$add_filter" + else + EXCLUDE_SET="$EXCLUDE_SET & $add_filter" + fi + done + echo "${EXCLUDE_SET}" +} + function retry_only_tests() { FILTERSET="" for test_name in "${RETRY_ONLY_TESTS[@]}"; do @@ -110,9 +135,17 @@ function rust_crates() { # mk_test_filterset returns an empty filterset in this case FILTERSET="$(mk_test_filterset)" - command="cargo nextest run --config-file .config/nextest.toml --profile ci $FILTERSET" + EXCLUDE_SET="$(mk_exclude_filterset)" + + if [ -z "$FILTERSET" ]; then + FILTERSET="-E '$EXCLUDE_SET'" + else + FILTERSET="-E '($FILTERSET) & ($EXCLUDE_SET)'" + fi + + command="cargo nextest run --config-file .config/nextest.toml --profile ci --all-features $FILTERSET" echo "Running: $command" - cargo nextest run --config-file .config/nextest.toml --profile ci $FILTERSET + eval ${command} } function external_crates() {