-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Description
UTBot cannot parse coverage.json file as it contains warnings. The reason is that coverage.json is written by redirecting output from llvm-cov export
command called from the shell.
To Reproduce
Steps to reproduce the behavior:
- Open the json-error project in VSCode
- Use plugin to generate tests for function
sum_up_to
from filelib/loops.c
- Run the generated test
Expected behavior
Coverage response is supposed to be generated and shown in project by color.
Actual behavior
Coverage response is not generated. In logs you can see the following error message:
2022-07-25 16:23:03.167 [utbot-YXZP ] JsonUtils.cpp:20 ERR| [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - invalid literal; last read: 'w': warning: 1 functions have mismatched data
Also in logs you'll find the whole coverage.json printed.
If you find file coverage.json
that was generated by llvm-cov export
, you'll see the following:
warning: 1 functions have mismatched data
(actual json file)
Environment
Reproduced on release 2022.7.1
Additional context
This issue is caused by creating json by redirecting output stream of llvm-cov export
to coverage.json
. Even if the issue is not reproducible this approach of creating coverage.json
file should be changed in order to avoid such issues in future!
Metadata
Metadata
Assignees
Labels
Type
Projects
Status