Skip to content

Commit 9756ec0

Browse files
authored
fix(tests): if no crates changed, test all crates (#5202) (#5203)
1 parent 770221e commit 9756ec0

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

.config/nextest.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ or test(test_good_snapshot)
3030
or test(test_insufficient_balance_will_retry_success)
3131
or test(test_byzantine_peer_handling)
3232
or test(test_json_rpc_spec)
33+
or test(cluster_test)
3334
'''
3435

3536
[[profile.ci.overrides]]
@@ -57,6 +58,8 @@ or test(test_pay_iota_multiple_times)
5758
or test(test_stake)
5859
or test(test_stake_all)
5960
or test(test_fullnode_traffic_control_spam_delegated)
61+
or test(ensure_no_tombstone_fragmentation_in_stack_frame_after_flush)
62+
or test(ip6)
6063
'''
6164

6265
[profile.simtestnightly]

.github/actions/diffs/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ runs:
5151
- ".github/workflows/_external_rust_tests.yml"
5252
- ".github/workflows/_cargo_deny.yml"
5353
- "scripts/cargo_sort/cargo_sort.py"
54+
- "scripts/ci_tests/rust_tests.sh"
5455
- "Cargo.toml"
5556
- "Cargo.lock"
5657
- ".config/nextest.toml"

scripts/ci_tests/rust_tests.sh

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ function mk_test_filterset() {
8181
FILTERSET="$FILTERSET $add_filter"
8282
fi
8383
done
84-
# if filterset is sill empty here, it means no changed crates were detected, there are no crates to test
85-
if [ -z "$FILTERSET" ]; then
86-
echo "test_none"
87-
return
88-
fi
84+
85+
# if no crates were changed, we want to run all tests.
86+
# because changes that trigger the workflow but which aren't explicitly in a crate can potentially affect the entire workspace
87+
# returning an empty filterset does that
88+
8989
echo "${FILTERSET}"
9090
}
9191

@@ -105,11 +105,10 @@ function rust_crates() {
105105
# non-deterministic `test` job.
106106
export IOTA_SKIP_SIMTESTS=1
107107

108+
# if no crates were changed, we want to run all tests.
109+
# because changes that trigger the workflow but which aren't explicitly in a crate can potentially affect the entire workspace
110+
# mk_test_filterset returns an empty filterset in this case
108111
FILTERSET="$(mk_test_filterset)"
109-
if [ "$FILTERSET" == "test_none" ]; then
110-
echo "No changed crates detected. Skipping"
111-
return
112-
fi
113112

114113
command="cargo nextest run --config-file .config/nextest.toml --profile ci $FILTERSET"
115114
echo "Running: $command"

0 commit comments

Comments
 (0)