[xcm-emulator] Chains generic over Network & Integration tests restructure (#2092)

Closes:
- #1383 
- Declared chains can be now be imported and reused in a different
crate.
- Chain declaration are now generic over a generic type `N` (the
Network)
- #1389
- Solved #1383, chains and networks declarations can be restructure to
avoid having to compile all chains when running integrations tests where
are not needed.
- Chains are now declared on its own crate (removed from
`integration-tests-common`)
- Networks are now declared on its own crate (removed from
`integration-tests-common`)
    - Integration tests will import only the relevant Network crate
- `integration-tests-common` is renamed to
`emulated-integration-tests-common`

All this is necessary to be able to implement what is described here:
https://github.com/paritytech/roadmap/issues/56#issuecomment-1777010553

---------

Co-authored-by: command-bot <>
This commit is contained in:
Ignacio Palacios
2023-11-08 16:02:03 +01:00
committed by GitHub
parent 50390950d8
commit ffa0e30e58
79 changed files with 2674 additions and 2750 deletions
@@ -1,11 +1,10 @@
[package]
name = "integration-tests-common"
name = "emulated-integration-tests-common"
version = "1.0.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
description = "Common resources for integration testing with xcm-emulator"
publish = false
[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false }
@@ -21,75 +20,26 @@ sp-core = { path = "../../../../../substrate/primitives/core", default-features
sp-consensus-babe = { path = "../../../../../substrate/primitives/consensus/babe", default-features = false}
pallet-assets = { path = "../../../../../substrate/frame/assets", default-features = false}
pallet-balances = { path = "../../../../../substrate/frame/balances", default-features = false}
pallet-staking = { path = "../../../../../substrate/frame/staking", default-features = false}
pallet-message-queue = { path = "../../../../../substrate/frame/message-queue", default-features = false}
pallet-im-online = { path = "../../../../../substrate/frame/im-online", default-features = false}
beefy-primitives = { package = "sp-consensus-beefy", path = "../../../../../substrate/primitives/consensus/beefy" }
sc-chain-spec = { path = "../../../../../substrate/client/chain-spec", default-features = false }
# Polkadot
polkadot-core-primitives = { path = "../../../../../polkadot/core-primitives", default-features = false}
polkadot-parachain-primitives = { path = "../../../../../polkadot/parachain", default-features = false}
polkadot-service = { path = "../../../../../polkadot/node/service", default-features = false, features = ["full-node"] }
polkadot-primitives = { path = "../../../../../polkadot/primitives", default-features = false}
polkadot-runtime-parachains = { path = "../../../../../polkadot/runtime/parachains" }
rococo-runtime = { path = "../../../../../polkadot/runtime/rococo" }
rococo-runtime-constants = { path = "../../../../../polkadot/runtime/rococo/constants" }
westend-runtime = { path = "../../../../../polkadot/runtime/westend" }
westend-runtime-constants = { path = "../../../../../polkadot/runtime/westend/constants" }
xcm = { package = "staging-xcm", path = "../../../../../polkadot/xcm", default-features = false}
pallet-xcm = { path = "../../../../../polkadot/xcm/pallet-xcm", default-features = false}
# Cumulus
parachains-common = { path = "../../../common" }
cumulus-primitives-core = { path = "../../../../primitives/core" }
penpal-runtime = { path = "../../../runtimes/testing/penpal" }
asset-hub-polkadot-runtime = { path = "../../../runtimes/assets/asset-hub-polkadot" }
asset-hub-kusama-runtime = { path = "../../../runtimes/assets/asset-hub-kusama" }
asset-hub-rococo-runtime = { path = "../../../runtimes/assets/asset-hub-rococo" }
asset-hub-westend-runtime = { path = "../../../runtimes/assets/asset-hub-westend" }
collectives-polkadot-runtime = { path = "../../../runtimes/collectives/collectives-polkadot" }
bridge-hub-kusama-runtime = { path = "../../../runtimes/bridge-hubs/bridge-hub-kusama" }
bridge-hub-polkadot-runtime = { path = "../../../runtimes/bridge-hubs/bridge-hub-polkadot" }
bridge-hub-rococo-runtime = { path = "../../../runtimes/bridge-hubs/bridge-hub-rococo" }
bridge-hub-westend-runtime = { path = "../../../runtimes/bridge-hubs/bridge-hub-westend" }
xcm-emulator = { default-features = false, path = "../../../../xcm/xcm-emulator" }
cumulus-pallet-xcmp-queue = { default-features = false, path = "../../../../pallets/xcmp-queue" }
xcm-emulator = { path = "../../../../xcm/xcm-emulator", default-features = false}
cumulus-pallet-xcmp-queue = { path = "../../../../pallets/xcmp-queue", default-features = false}
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system" }
asset-test-utils = { path = "../../../runtimes/assets/test-utils" }
# Bridges
bp-messages = { path = "../../../../../bridges/primitives/messages" }
pallet-bridge-messages = { path = "../../../../../bridges/modules/messages" }
bridge-runtime-common = { path = "../../../../../bridges/bin/runtime-common" }
[features]
runtime-benchmarks = [
"asset-hub-kusama-runtime/runtime-benchmarks",
"asset-hub-polkadot-runtime/runtime-benchmarks",
"asset-hub-rococo-runtime/runtime-benchmarks",
"asset-hub-westend-runtime/runtime-benchmarks",
"bridge-hub-kusama-runtime/runtime-benchmarks",
"bridge-hub-polkadot-runtime/runtime-benchmarks",
"bridge-hub-rococo-runtime/runtime-benchmarks",
"bridge-hub-westend-runtime/runtime-benchmarks",
"bridge-runtime-common/runtime-benchmarks",
"collectives-polkadot-runtime/runtime-benchmarks",
"cumulus-pallet-parachain-system/runtime-benchmarks",
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
"cumulus-primitives-core/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"pallet-assets/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-bridge-messages/runtime-benchmarks",
"pallet-im-online/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"pallet-staking/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"parachains-common/runtime-benchmarks",
"penpal-runtime/runtime-benchmarks",
"polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"polkadot-runtime-parachains/runtime-benchmarks",
"polkadot-service/runtime-benchmarks",
"rococo-runtime/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"westend-runtime/runtime-benchmarks",
]