Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Master.into()
Browse files Browse the repository at this point in the history
  • Loading branch information
kianenigma committed Jan 26, 2023
2 parents 4c3eb7d + 0261d12 commit 6825d0a
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 13 deletions.
6 changes: 5 additions & 1 deletion runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2255,6 +2255,10 @@ mod remote_tests {

#[tokio::test]
async fn run_migrations() {
if var("RUN_MIGRATION_TESTS").is_err() {
return
}

sp_tracing::try_init_simple();
let transport: Transport =
var("WS").unwrap_or("wss://kusama-rpc.polkadot.io:443".to_string()).into();
Expand All @@ -2275,7 +2279,7 @@ mod remote_tests {
.build()
.await
.unwrap();
ext.execute_with(|| Runtime::on_runtime_upgrade(UpgradeCheckSelect::All));
ext.execute_with(|| Runtime::on_runtime_upgrade(UpgradeCheckSelect::PreAndPost));
}

#[tokio::test]
Expand Down
6 changes: 5 additions & 1 deletion runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2451,6 +2451,10 @@ mod remote_tests {

#[tokio::test]
async fn run_migrations() {
if var("RUN_MIGRATION_TESTS").is_err() {
return
}

sp_tracing::try_init_simple();
let transport: Transport =
var("WS").unwrap_or("wss://rpc.polkadot.io:443".to_string()).into();
Expand All @@ -2471,7 +2475,7 @@ mod remote_tests {
.build()
.await
.unwrap();
ext.execute_with(|| Runtime::on_runtime_upgrade(UpgradeCheckSelect::All));
ext.execute_with(|| Runtime::on_runtime_upgrade(UpgradeCheckSelect::PreAndPost));
}

#[tokio::test]
Expand Down
10 changes: 6 additions & 4 deletions runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2099,14 +2099,18 @@ sp_api::impl_runtime_apis! {
#[cfg(all(test, feature = "try-runtime"))]
mod remote_tests {
use super::*;
use frame_try_runtime::runtime_decl_for_TryRuntime::TryRuntime;
use frame_try_runtime::{runtime_decl_for_TryRuntime::TryRuntime, UpgradeCheckSelect};
use remote_externalities::{
Builder, Mode, OfflineConfig, OnlineConfig, SnapshotConfig, Transport,
};
use std::env::var;

#[tokio::test]
async fn run_migrations() {
if var("RUN_MIGRATION_TESTS").is_err() {
return
}

sp_tracing::try_init_simple();
let transport: Transport =
var("WS").unwrap_or("wss://rococo-rpc.polkadot.io:443".to_string()).into();
Expand All @@ -2127,8 +2131,6 @@ mod remote_tests {
.build()
.await
.unwrap();
ext.execute_with(|| {
Runtime::on_runtime_upgrade(frame_try_runtime::UpgradeCheckSelect::All)
});
ext.execute_with(|| Runtime::on_runtime_upgrade(UpgradeCheckSelect::PreAndPost));
}
}
10 changes: 6 additions & 4 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1853,14 +1853,18 @@ sp_api::impl_runtime_apis! {
#[cfg(all(test, feature = "try-runtime"))]
mod remote_tests {
use super::*;
use frame_try_runtime::runtime_decl_for_TryRuntime::TryRuntime;
use frame_try_runtime::{runtime_decl_for_TryRuntime::TryRuntime, UpgradeCheckSelect};
use remote_externalities::{
Builder, Mode, OfflineConfig, OnlineConfig, SnapshotConfig, Transport,
};
use std::env::var;

#[tokio::test]
async fn run_migrations() {
if var("RUN_MIGRATION_TESTS").is_err() {
return
}

sp_tracing::try_init_simple();
let transport: Transport =
var("WS").unwrap_or("wss://westend-rpc.polkadot.io:443".to_string()).into();
Expand All @@ -1881,9 +1885,7 @@ mod remote_tests {
.build()
.await
.unwrap();
ext.execute_with(|| {
Runtime::on_runtime_upgrade(frame_try_runtime::UpgradeCheckSelect::All)
});
ext.execute_with(|| Runtime::on_runtime_upgrade(UpgradeCheckSelect::PreAndPost));
}
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ test-linux-stable:
# but still want to have debug assertions.
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
script:
- time cargo test --workspace --profile testnet --verbose --locked --features=runtime-benchmarks,runtime-metrics
- time cargo test --workspace --profile testnet --verbose --locked --features=runtime-benchmarks,runtime-metrics,try-runtime

.check-dependent-project: &check-dependent-project
stage: test
Expand Down
2 changes: 0 additions & 2 deletions xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ benchmarks! {
call: double_encoded_noop_call,
};
let xcm = Xcm(vec![instruction]);

let num_events = frame_system::Pallet::<T>::events().len();
}: {
executor.bench_process(xcm)?;
} verify {
Expand Down

0 comments on commit 6825d0a

Please sign in to comment.