Skip to content

Commit

Permalink
after review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SRetip committed Mar 21, 2024
1 parent c2a1aa7 commit 766185c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion module/move/willbe/src/action/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ mod private
optimizations : HashSet< optimization::Optimization >,
#[ default( 1000u32 ) ]
variants_cap : u32,
#[ default( true ) ]
#[ default( false ) ]
with_progress : bool,
}

Expand Down
5 changes: 5 additions & 0 deletions module/move/willbe/src/command/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ pub( crate ) mod private
.kind( Type::Number )
.optional( true )
.end()
.property( "with_progress" )
.hint( "If true, will display progressbar during the tests. Default is `true`. ! Work only with `progress_bar` feature !")
.kind( Type::Bool )
.optional( true )
.end()
.routine( command::test )
.end()

Expand Down
7 changes: 6 additions & 1 deletion module/move/willbe/src/command/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ mod private
with_debug : bool,
#[ default( false ) ]
with_release : bool,
#[ default( true ) ]
with_progress : bool,
}

/// run tests in specified crate
Expand All @@ -62,7 +64,8 @@ mod private
with_all_features,
with_none_features,
with_debug,
with_release
with_release,
with_progress
} = properties.try_into()?;

let mut channels = HashSet::new();
Expand Down Expand Up @@ -91,6 +94,7 @@ mod private
.with_all_features( with_all_features )
.with_none_features( with_none_features )
.optimizations( optimizations )
.with_progress( with_progress )
.form();

match action::test( args, dry )
Expand Down Expand Up @@ -129,6 +133,7 @@ mod private
this = if let Some( v ) = value.get_owned( "with_all_features" ) { this.with_all_features::< bool >( v ) } else { this };
this = if let Some( v ) = value.get_owned( "with_none_features" ) { this.with_none_features::< bool >( v ) } else { this };
this = if let Some( v ) = value.get_owned( "always" ) { this.enabled_features::< Vec< String > >( v ) } else { this };
this = if let Some( v ) = value.get_owned( "with_progress" ) { this.with_progress::< bool >( v ) } else { this };

Ok( this.form() )
}
Expand Down
3 changes: 0 additions & 3 deletions module/move/willbe/tests/inc/action/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ fn fail_test()
.channels([ Channel::Stable ])
.optimizations([ Optimization::Debug ])
.with_none_features( true )
.with_progress( false )
.form();

let rep = test( args, false ).unwrap_err().0;
Expand Down Expand Up @@ -76,7 +75,6 @@ fn fail_build()
.channels([ Channel::Stable ])
.optimizations([ Optimization::Debug ])
.with_none_features( true )
.with_progress( false )
.form();

let rep = test( args, false ).unwrap_err().0;
Expand Down Expand Up @@ -139,7 +137,6 @@ fn call_from_workspace_root()
.channels([ Channel::Stable ])
.optimizations([ optimization::Optimization::Debug ])
.with_none_features( true )
.with_progress( false )
.form();


Expand Down

0 comments on commit 766185c

Please sign in to comment.