1- use crate :: { cli:: test:: SovereignParams , logging:: create_with_logs} ;
1+ use crate :: { check_binary , cli:: test:: SovereignParams , logging:: create_with_logs} ;
22use anyhow:: bail;
33use duct:: cmd;
44use tracing:: info;
@@ -18,6 +18,12 @@ impl Sovereign {
1818 . stdout_null ( )
1919 . run ( ) ?;
2020
21+ check_binary (
22+ "sov-demo-rollup" ,
23+ "'sov-demo-rollup' is not found in PATH. \n \
24+ cd to 'demo/sovereign/demo-rollup' and run 'cargo build --release' and add the result into your PATH."
25+ ) ?;
26+
2127 info ! ( "Sovereign logs redirected to {}" , params. log_path) ;
2228 let with_logs = create_with_logs ( params. log_path . clone ( ) ) ;
2329
@@ -27,7 +33,7 @@ impl Sovereign {
2733 "Launching sovereign rollup" ,
2834 cmd ! (
2935 "sh" , "-c" ,
30- "cd demo/sovereign/demo-rollup && ./../target/release/ sov-demo-rollup"
36+ "cd demo/sovereign/demo-rollup && sov-demo-rollup"
3137 ) ,
3238 ) . start ( ) ?;
3339
@@ -39,16 +45,21 @@ impl Sovereign {
3945
4046 // All the networks must be up (relaychain and ikura-node), including the sovereign rollup."
4147 pub fn test_sovereign_rollup ( & self ) -> anyhow:: Result < ( ) > {
48+ check_binary (
49+ "sov-cli" ,
50+ "'sov-cli' is not found in PATH. \n \
51+ cd to 'demo/sovereign/demo-rollup' and run 'cargo build --release' and add the result into your PATH."
52+ ) ?;
53+
4254 info ! ( "Running sovereign rollup test" ) ;
4355
4456 //TODO: https://github.com/thrumdev/blobs/issues/227
45- let cli = "../target/release/sov-cli" ;
4657 let test_data_path = "../test-data/" ;
4758 let run_cli_cmd =
4859 |description : & str , args : & str | -> std:: io:: Result < std:: process:: Output > {
4960 let args = [
5061 "-c" ,
51- & format ! ( "cd demo/sovereign/demo-rollup/ && ./{} {}" , cli , args) ,
62+ & format ! ( "cd demo/sovereign/demo-rollup/ && sov-cli {}" , args) ,
5263 ] ;
5364
5465 ( self . with_logs ) ( description, duct:: cmd ( "sh" , args) ) . run ( )
0 commit comments