@@ -10,12 +10,51 @@ pub struct Cli {
1010#[ derive( Subcommand , Debug ) ]
1111pub enum Commands {
1212 Test ( test:: Params ) ,
13+ Zombienet ( zombienet:: Params ) ,
14+ }
15+
16+ #[ derive( clap:: Args , Debug , Clone ) ]
17+ pub struct ZombienetParams {
18+ /// Zombienet process stdout and stderr are redirected into this file
19+ ///
20+ /// Relative paths will be treated as relative to the root project directory
21+ /// and not relative to where it is called
22+ #[ arg(
23+ long = "zombienet-log-path" ,
24+ value_name = "log-path" ,
25+ id = "zombienet.log-path"
26+ ) ]
27+ #[ clap( default_value = "test_log/zombienet.log" ) ]
28+ pub log_path : String ,
29+ }
30+
31+ #[ derive( clap:: Args , Debug , Clone ) ]
32+ pub struct BuildParams {
33+ /// Skip building required binaries
34+ /// (ikura-node, ikura-shim, sov-demo-rollup and sov-cli)
35+ #[ clap( default_value = "false" ) ]
36+ #[ arg( long = "skip-build" , value_name = "skip" , id = "build.skip" ) ]
37+ pub skip : bool ,
38+
39+ /// Build process stdout and stderr are redirected into this file
40+ ///
41+ /// Relative paths will be treated as relative to the root project directory
42+ /// and not relative to where it is called
43+ #[ arg(
44+ long = "build-log-path" ,
45+ value_name = "log-path" ,
46+ id = "build.log-path"
47+ ) ]
48+ #[ clap( default_value = "test_log/build.log" ) ]
49+ pub log_path : String ,
1350}
1451
1552pub mod test {
53+ use super :: { BuildParams , ZombienetParams } ;
1654
1755 // TODO: https://github.com/thrumdev/blobs/issues/224
1856 use clap:: Args ;
57+
1958 #[ derive( Debug , Args ) ]
2059 pub struct Params {
2160 /// If the test is executed in CI
@@ -35,27 +74,6 @@ pub mod test {
3574 pub sovereign : SovereignParams ,
3675 }
3776
38- #[ derive( clap:: Args , Debug , Clone ) ]
39- pub struct BuildParams {
40- /// Skip building required binaries
41- /// (ikura-node, ikura-shim, sov-demo-rollup and sov-cli)
42- #[ clap( default_value = "false" ) ]
43- #[ arg( long = "skip-build" , value_name = "skip" , id = "build.skip" ) ]
44- pub skip : bool ,
45-
46- /// Build process stdout and stderr are redirected into this file
47- ///
48- /// Relative paths will be treated as relative to the root project directory
49- /// and not relative to where it is called
50- #[ arg(
51- long = "build-log-path" ,
52- value_name = "log-path" ,
53- id = "build.log-path"
54- ) ]
55- #[ clap( default_value = "test_log/build.log" ) ]
56- pub log_path : String ,
57- }
58-
5977 #[ derive( clap:: Args , Debug , Clone ) ]
6078 pub struct ShimParams {
6179 /// Shim process stdout and stderr are redirected into this file
@@ -67,21 +85,6 @@ pub mod test {
6785 pub log_path : String ,
6886 }
6987
70- #[ derive( clap:: Args , Debug , Clone ) ]
71- pub struct ZombienetParams {
72- /// Zombienet process stdout and stderr are redirected into this file
73- ///
74- /// Relative paths will be treated as relative to the root project directory
75- /// and not relative to where it is called
76- #[ arg(
77- long = "zombienet-log-path" ,
78- value_name = "log-path" ,
79- id = "zombienet.log-path"
80- ) ]
81- #[ clap( default_value = "test_log/zombienet.log" ) ]
82- pub log_path : String ,
83- }
84-
8588 #[ derive( clap:: Args , Debug , Clone ) ]
8689 pub struct SovereignParams {
8790 /// Sovereign rollup process stdout and stderr are redirected into this file
@@ -97,3 +100,21 @@ pub mod test {
97100 pub log_path : String ,
98101 }
99102}
103+
104+ pub mod zombienet {
105+ use super :: { BuildParams , ZombienetParams } ;
106+ use clap:: Args ;
107+
108+ #[ derive( Debug , Args ) ]
109+ pub struct Params {
110+ /// If the test is executed in CI
111+ #[ clap( long, default_value = "false" ) ]
112+ pub ci : bool ,
113+
114+ #[ clap( flatten) ]
115+ pub build : BuildParams ,
116+
117+ #[ clap( flatten) ]
118+ pub zombienet : ZombienetParams ,
119+ }
120+ }
0 commit comments