mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 15:57:55 +00:00
Test each benchmark case in own #[test] (#9860)
* Generate one #[test] fn per bench case. * Update benchmark macro syntax in frame pallets. * Explain new benchmark macro syntax in example pallet. * support with and without a semicolon * update pallets to use individual tests * migrate staking too * migrate more pallets * fix up democracy and use individual tests * Fix comment * Put println message in panic * Remove `another_set_dummy` from doc `another_set_dummy` is not present in the benchmarking.rs (anymore). * Update doc for benchmarks macro * Update doc for impl_benchmark_test_suite macro Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -887,6 +887,13 @@ benchmarks! {
|
||||
verify {
|
||||
assert!(!T::SortedListProvider::contains(&stash));
|
||||
}
|
||||
|
||||
impl_benchmark_test_suite!(
|
||||
Staking,
|
||||
crate::mock::ExtBuilder::default().has_stakers(true),
|
||||
crate::mock::Test,
|
||||
exec_name = build_and_execute
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -1001,10 +1008,3 @@ mod tests {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
impl_benchmark_test_suite!(
|
||||
Staking,
|
||||
crate::mock::ExtBuilder::default().has_stakers(true),
|
||||
crate::mock::Test,
|
||||
exec_name = build_and_execute
|
||||
);
|
||||
|
||||
@@ -272,6 +272,7 @@
|
||||
//! validators is stored in the Session pallet's `Validators` at the end of each era.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub mod benchmarking;
|
||||
|
||||
Reference in New Issue
Block a user