Skip to content

Commit

Permalink
[move] Print stack trace in unit tests (aptos-labs#5374)
Browse files Browse the repository at this point in the history
It just need to be turned on. However, the existing implementation in the Move repo isn't optimal. For example, it prints stacktrace only on Move abort, but not internal (like division by zero) error.
  • Loading branch information
wrwg authored Oct 31, 2022
1 parent c4ead0f commit 85bc767
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/aptos/src/move_tool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ impl CliCommand<Vec<String>> for CompilePackage {
#[derive(Parser)]
pub struct TestPackage {
/// A filter string to determine which unit tests to run
#[clap(long)]
#[clap(long, short)]
pub filter: Option<String>,

#[clap(flatten)]
Expand Down Expand Up @@ -334,6 +334,7 @@ impl CliCommand<&'static str> for TestPackage {
UnitTestingConfig {
filter: self.filter,
instruction_execution_bound: Some(self.instruction_execution_bound),
report_stacktrace_on_abort: true,
..UnitTestingConfig::default_with_bound(None)
},
// TODO(Gas): we may want to switch to non-zero costs in the future
Expand Down

0 comments on commit 85bc767

Please sign in to comment.