Skip to content

Commit

Permalink
[VSCode] Add Debugging targets for pw_fuzzer FuzzTests:
Browse files Browse the repository at this point in the history
Two Targets are added:
1- Unit Test Mode: which executes all FuzzTests in a single binary for a few seconds
2- Continous Fuzzing Mode: we choose a specific FuzzTest, it will only stop execution once a crash occurs or user explicitly Interrupts it
  • Loading branch information
Alami-Amine committed Nov 12, 2024
1 parent 47780ad commit 1338624
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,25 @@
"args": [],
"cwd": "${workspaceFolder}"
},

{
"name": "Run pw FuzzTest (Linux x64) UnitTest Mode",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/out/${input:outPWFuzzTestLinux}",
"cwd": "${workspaceFolder}"
},

{
"name": "Run pw FuzzTest (Linux x64) Continuous Fuzzing Mode",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/out/${input:outPWFuzzTestLinux}",
"args": ["-fuzz=${input:fuzzTestName}"],
"cwd": "${workspaceFolder}",
"preLaunchTask": ""
},

{
"name": "QRCode Tests",
"type": "cppdbg",
Expand Down Expand Up @@ -528,6 +547,24 @@
"description": "Select the test to run"
}
},
{
"type": "command",
"id": "outPWFuzzTestLinux",
"command": "shellCommand.execute",
"args": {
"command": "find ${workspaceFolder}/out/linux-x64-*/chip_pw_fuzztest/tests -type f -executable |sort |sed 's$${workspaceFolder}/out/$$'",
"description": "Select the FuzzTest to run"
}
},
{
"id": "fuzzTestName",
"type": "command",
"command": "shellCommand.execute",
"args": {
"command": "./out/${input:outPWFuzzTestLinux} --list_fuzz_tests | grep 'Fuzz test:' | awk -F ': ' '{print $2}'",
"description": "Select the specific FuzzTest to fuzz continuously"
}
},
{
"type": "pickString",
"id": "mbedDebugProfile",
Expand Down

0 comments on commit 1338624

Please sign in to comment.