[wip] unit testing
- tooling for code coverage measurement
This commit is contained in:
parent
96ea0ddab9
commit
cb5873b732
4 changed files with 52 additions and 17 deletions
|
|
@ -47,7 +47,6 @@
|
|||
"extensions": [
|
||||
"mhutchie.git-graph",
|
||||
"Gruntfuggly.todo-tree",
|
||||
"ms-vscode.live-server",
|
||||
"ryanluker.vscode-coverage-gutters"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -1,3 +1,7 @@
|
|||
# code coverage reports
|
||||
coverage/
|
||||
|
||||
|
||||
# https://github.com/github/gitignore/raw/refs/heads/main/Rust.gitignore
|
||||
|
||||
# Generated by Cargo
|
||||
|
|
|
|||
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
|
|
@ -43,7 +43,6 @@
|
|||
"black"
|
||||
],
|
||||
"todo-tree.highlights.useColourScheme": true,
|
||||
"coverage-gutters.coverageReportFileName": "target/llvm-cov/**/index.html",
|
||||
// // override the default setting (`cargo check --all-targets`) which produces the following error
|
||||
// // "can't find crate for `test`" when the default compilation target is a no_std target
|
||||
// "rust-analyzer.checkOnSave.allTargets": false,
|
||||
|
|
|
|||
63
.vscode/tasks.json
vendored
63
.vscode/tasks.json
vendored
|
|
@ -5,9 +5,6 @@
|
|||
"label": "Build Project",
|
||||
"type": "cargo",
|
||||
"command": "build",
|
||||
// "presentation": {
|
||||
// "reveal": "silent"
|
||||
// },
|
||||
"problemMatcher": "$rustc",
|
||||
"group": "build"
|
||||
},
|
||||
|
|
@ -62,18 +59,6 @@
|
|||
"problemMatcher": "$rustc",
|
||||
"group": "test"
|
||||
},
|
||||
{
|
||||
"label": "Run Coverage",
|
||||
"type": "cargo",
|
||||
"command": "llvm-cov",
|
||||
"args": [
|
||||
"--lcov",
|
||||
"--output-path" ,
|
||||
"target/lcov.info"
|
||||
],
|
||||
"problemMatcher": "$rustc",
|
||||
"group": "test"
|
||||
},
|
||||
// {
|
||||
// "label": "Run Integration Tests",
|
||||
// "type": "cargo",
|
||||
|
|
@ -85,6 +70,54 @@
|
|||
// "problemMatcher": "$rustc",
|
||||
// "group": "test"
|
||||
// },
|
||||
{
|
||||
"label": "Test Coverage",
|
||||
"hide": true,
|
||||
"type": "cargo",
|
||||
"command": "llvm-cov",
|
||||
"args": [],
|
||||
"problemMatcher": "$rustc",
|
||||
"group": "test",
|
||||
},
|
||||
{
|
||||
"label": "Report Coverage (html)",
|
||||
"hide": true,
|
||||
"type": "cargo",
|
||||
"command": "llvm-cov",
|
||||
"args": [
|
||||
"report",
|
||||
"--html",
|
||||
"--output-dir" ,
|
||||
"coverage",
|
||||
],
|
||||
"problemMatcher": "$rustc",
|
||||
"group": "test"
|
||||
},
|
||||
{
|
||||
"label": "Report Coverage (lcov)",
|
||||
"hide": true,
|
||||
"type": "cargo",
|
||||
"command": "llvm-cov",
|
||||
"args": [
|
||||
"report",
|
||||
"--lcov",
|
||||
"--output-path" ,
|
||||
"coverage/lcov.info",
|
||||
],
|
||||
"problemMatcher": "$rustc",
|
||||
"group": "test"
|
||||
},
|
||||
{
|
||||
"label": "Run Coverage",
|
||||
"type": "shell",
|
||||
"dependsOn": [
|
||||
"Test Coverage",
|
||||
"Report Coverage (html)",
|
||||
"Report Coverage (lcov)",
|
||||
],
|
||||
"dependsOrder": "sequence",
|
||||
"group": "test"
|
||||
},
|
||||
{
|
||||
"label": "Run All Tests",
|
||||
"type": "shell",
|
||||
|
|
|
|||
Loading…
Reference in a new issue