[wip] unit testing
- tooling for code coverage measurement
This commit is contained in:
parent
4d47530326
commit
96ea0ddab9
3 changed files with 23 additions and 4 deletions
|
|
@ -13,7 +13,10 @@
|
|||
"configureZshAsDefaultShell": "true"
|
||||
},
|
||||
"ghcr.io/devcontainers/features/rust:1": {
|
||||
"targets": "x86_64-unknown-linux-musl"
|
||||
"targets": "x86_64-unknown-linux-gnu,x86_64-unknown-linux-musl"
|
||||
},
|
||||
"ghcr.io/lee-orr/rusty-dev-containers/cargo-binstall:0": {
|
||||
"packages": "cargo-llvm-cov"
|
||||
},
|
||||
"ghcr.io/devcontainers-contrib/features/apt-get-packages:1": {
|
||||
"packages": "git-flow, musl-tools"
|
||||
|
|
@ -33,7 +36,7 @@
|
|||
// "forwardPorts": [],
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
"postCreateCommand": "rustup target install x86_64-unknown-linux-musl | :",
|
||||
// "postCreateCommand": "rustup target install x86_64-unknown-linux-musl | :",
|
||||
|
||||
// Configure tool-specific properties.
|
||||
"customizations": {
|
||||
|
|
@ -43,7 +46,9 @@
|
|||
},
|
||||
"extensions": [
|
||||
"mhutchie.git-graph",
|
||||
"Gruntfuggly.todo-tree"
|
||||
"Gruntfuggly.todo-tree",
|
||||
"ms-vscode.live-server",
|
||||
"ryanluker.vscode-coverage-gutters"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
|
|||
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
|
|
@ -43,6 +43,7 @@
|
|||
"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,
|
||||
|
|
|
|||
15
.vscode/tasks.json
vendored
15
.vscode/tasks.json
vendored
|
|
@ -62,6 +62,18 @@
|
|||
"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",
|
||||
|
|
@ -79,7 +91,8 @@
|
|||
"command": "echo All Tests successful!",
|
||||
"dependsOn": [
|
||||
"Run Unit Tests",
|
||||
// "Run Integration Tests"
|
||||
// "Run Integration Tests",
|
||||
"Run Coverage",
|
||||
],
|
||||
"dependsOrder": "sequence",
|
||||
"group": "test"
|
||||
|
|
|
|||
Loading…
Reference in a new issue