Skip to content

Commit ef34921

Browse files
committed
fix cmd.py fail early on 'not found' error
1 parent 6ffd1e1 commit ef34921

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

runtimes/bulletin-westend/src/weights/xcm/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl<Call> XcmWeightInfo<Call> for BulletinWestendXcmWeight<Call> {
6868
assets.weigh_assets(XcmFungibleWeight::<Runtime>::reserve_asset_deposited())
6969
}
7070
fn receive_teleported_asset(assets: &Assets) -> Weight {
71-
assets.weigh_assets(XcmFungibleWeight::<Runtime>::receive_teleported_asset())
71+
Weight::MAX
7272
}
7373
fn query_response(
7474
_query_id: &u64,

runtimes/bulletin-westend/src/weights/xcm/pallet_xcm_benchmarks_fungible.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@ impl<T: frame_system::Config> WeightInfo<T> {
9797
Weight::from_parts(2_130_000, 0)
9898
}
9999

100-
pub(crate) fn receive_teleported_asset() -> Weight {
101-
// Teleportation is not supported by this runtime.
102-
Weight::MAX
103-
}
104100
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
105101
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
106102
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)

scripts/cmd/cmd.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@
9797
wasm_file = f"target/{profile}/wbuild/{runtime['package']}/{runtime['package'].replace('-', '_')}.wasm"
9898
output = os.popen(
9999
f"frame-omni-bencher v1 benchmark pallet --no-csv-header --all --list --runtime={wasm_file}").read()
100+
if output == "":
101+
print(f'frame-omni-bencher not found')
102+
sys.exit(1)
100103
raw_pallets = output.split('\n')
101104

102105
all_pallets = set()
@@ -130,7 +133,7 @@
130133
print(f"No pallets [{args.pallet}] found in {args.runtime}")
131134
else:
132135
print('No runtimes found')
133-
sys.exit(0)
136+
sys.exit(1)
134137

135138
header_path = os.path.abspath('./scripts/cmd/file_header.txt')
136139

0 commit comments

Comments
 (0)