move icon indicating copy to clipboard operation
move copied to clipboard

[Bug][Move CLI] move test crashes when --coverage is specified with no test cases being executed

Open rahxephon89 opened this issue 2 years ago • 1 comments

🐛 Bug

In the move cli, we can specify test cases to run by executing move test MODULE_TO_TEST. However, if there is no test to be executed, move cli will panic when the option --coverage is attached probably because no coverage trace file is generated.

To reproduce

Inside language/move-stdlib, executing move test 0x1::vector_tests --coverage will lead to panic with the error message:

thread 'main' panicked at 'Unable to open coverage trace file '"./.trace"'', .../language/tools/movecoverage/src/coverage_map.rs:67:33

Expected Behavior

Better error message instead of panic

rahxephon89 avatar Mar 07 '23 23:03 rahxephon89

Hi, @tnowacki @tzakian, I am wondering whether the panic described in this issue is intentional or not? If not, could you give me some direction on how to fix it? Thanks

rahxephon89 avatar Mar 07 '23 23:03 rahxephon89