Skip to content

Commit

Permalink
Remove nextest filtration (#3885)
Browse files Browse the repository at this point in the history
Fixes
#3884 (comment)

After moving regression tests to benchmarks
(#3741) we don't need to
filter tests anymore.

---------

Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Andrei Sandu <[email protected]>
Co-authored-by: Alin Dima <[email protected]>
Co-authored-by: Andrei Sandu <[email protected]>
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Javier Viola <[email protected]>
Co-authored-by: Serban Iorga <[email protected]>
Co-authored-by: Adrian Catangiu <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: Alexandru Vasile <[email protected]>
Co-authored-by: Niklas Adolfsson <[email protected]>
Co-authored-by: Dastan <[email protected]>
Co-authored-by: Liam Aharon <[email protected]>
Co-authored-by: Clara van Staden <[email protected]>
Co-authored-by: Ron <[email protected]>
Co-authored-by: Vincent Geddes <[email protected]>
Co-authored-by: Svyatoslav Nikolsky <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
  • Loading branch information
18 people authored Apr 2, 2024
1 parent f88190a commit 665e365
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ test-linux-stable:
# "upgrade_version_checks_should_work" is currently failing
- |
time cargo nextest run \
--filter-expr 'not deps(/polkadot-subsystem-bench/)' \
--workspace \
--locked \
--release \
Expand Down Expand Up @@ -70,7 +69,7 @@ test-linux-stable-runtime-benchmarks:
# but still want to have debug assertions.
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
script:
- time cargo nextest run --filter-expr 'not deps(/polkadot-subsystem-bench/)' --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet
- time cargo nextest run --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet

# can be used to run all tests
# test-linux-stable-all:
Expand Down
5 changes: 5 additions & 0 deletions substrate/frame/core-fellowship/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ mod benchmarks {

#[benchmark]
fn promote() -> Result<(), BenchmarkError> {
// Ensure that the `min_promotion_period` wont get in our way.
let mut params = Params::<T, I>::get();
params.min_promotion_period = [Zero::zero(); RANK_COUNT];
Params::<T, I>::put(&params);

let member = make_member::<T, I>(1)?;
ensure_evidence::<T, I>(&member)?;

Expand Down
3 changes: 2 additions & 1 deletion substrate/frame/core-fellowship/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ pub mod pallet {
};
use frame_system::{ensure_root, pallet_prelude::*};

const RANK_COUNT: usize = 9;
/// Number of available ranks.
pub(crate) const RANK_COUNT: usize = 9;

#[pallet::pallet]
pub struct Pallet<T, I = ()>(PhantomData<(T, I)>);
Expand Down
5 changes: 4 additions & 1 deletion substrate/frame/scheduler/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1501,8 +1501,11 @@ fn scheduler_handles_periodic_unavailable_preimage() {
run_to_block(4);
assert_eq!(logger::log().len(), 1);

// Unnote the preimage
// As the public api doesn't support to remove a noted preimage, we need to first unnote it
// and then request it again. Basically this should not happen in real life (whatever you
// call real life;).
Preimage::unnote(&hash);
Preimage::request(&hash);

// Does not ever execute again.
run_to_block(100);
Expand Down

0 comments on commit 665e365

Please sign in to comment.