Skip to content

Commit

Permalink
chain_spec_runtime_tests: wasm path fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
michalkucharczyk committed Nov 27, 2024
1 parent 7d5d720 commit 4cc7296
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
use serde_json::{json, Value};
use std::{process::Command, str};

const WASM_FILE_PATH: &str =
"../../../../../target/release/wbuild/chain-spec-guide-runtime/chain_spec_guide_runtime.wasm";
fn wasm_file_path() -> &'static str {
chain_spec_guide_runtime::runtime::WASM_BINARY_PATH
.expect("chain_spec_guide_runtime wasm should exists. qed")
}

const CHAIN_SPEC_BUILDER_PATH: &str = "../../../../../target/release/chain-spec-builder";

Expand All @@ -26,7 +28,7 @@ fn list_presets() {
let output = Command::new(get_chain_spec_builder_path())
.arg("list-presets")
.arg("-r")
.arg(WASM_FILE_PATH)
.arg(wasm_file_path())
.output()
.expect("Failed to execute command");

Expand All @@ -50,7 +52,7 @@ fn get_preset() {
let output = Command::new(get_chain_spec_builder_path())
.arg("display-preset")
.arg("-r")
.arg(WASM_FILE_PATH)
.arg(wasm_file_path())
.arg("-p")
.arg("preset_2")
.output()
Expand Down Expand Up @@ -83,7 +85,7 @@ fn generate_chain_spec() {
.arg("/dev/stdout")
.arg("create")
.arg("-r")
.arg(WASM_FILE_PATH)
.arg(wasm_file_path())
.arg("named-preset")
.arg("preset_2")
.output()
Expand Down Expand Up @@ -140,7 +142,7 @@ fn generate_para_chain_spec() {
.arg("-p")
.arg("1000")
.arg("-r")
.arg(WASM_FILE_PATH)
.arg(wasm_file_path())
.arg("named-preset")
.arg("preset_2")
.output()
Expand Down

0 comments on commit 4cc7296

Please sign in to comment.