-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IDE support: add _vscode with launch.json and tasks.json
Add _vscode which can be renamed to .vscode. It contains a launch.json for executing the unit and integration tests (when they are the currently active editor tab). Additionally, launch.json contains the relevant build tasks. Signed-off-by: Johannes Holland <johannes.holland@infineon.de>
- Loading branch information
Showing
2 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug Test", | ||
"program": "${workspaceFolder}/${relativeFileDirname}/.libs/${fileBasenameNoExtension}", | ||
"args": [], | ||
"cwd": "${workspaceFolder}", | ||
"env": { | ||
"TPM20TEST_TCTI": "${input:tcti}", | ||
"TSS2_LOG": "all+trace", | ||
"LD_LIBRARY_PATH": "${workspaceFolder}/src/tss2-mu/.libs:${workspaceFolder}/src/tss2-tcti/.libs:${workspaceFolder}/src/tss2-sys/.libs:${workspaceFolder}/src/tss2-esys/.libs:${workspaceFolder}/src/tss2-rc/.libs:${workspaceFolder}/src/tss2-policy/.libs:${workspaceFolder}/src/tss2-fapi/.libs" | ||
}, | ||
"preLaunchTask": "build_test", | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Debug tpm2 startup", | ||
"program": "/bin/env", | ||
"args": [ | ||
"tpm2", | ||
"startup", | ||
"-c", | ||
"-T${input:tcti}", | ||
], | ||
"cwd": "${workspaceFolder}", | ||
"env": { | ||
"TSS2_LOG": "all+trace", | ||
"LD_LIBRARY_PATH": "${workspaceFolder}/src/tss2-mu/.libs:${workspaceFolder}/src/tss2-tcti/.libs:${workspaceFolder}/src/tss2-sys/.libs:${workspaceFolder}/src/tss2-esys/.libs:${workspaceFolder}/src/tss2-rc/.libs:${workspaceFolder}/src/tss2-policy/.libs:${workspaceFolder}/src/tss2-fapi/.libs" | ||
}, | ||
"preLaunchTask": "build_tcti_libtpms", | ||
}, | ||
], | ||
"inputs": [ | ||
{ | ||
"id": "tcti", | ||
"type": "pickString", | ||
"description": "The TCTI for connecting to a TPM", | ||
"options": [ | ||
"libtpms", | ||
"swtpm", | ||
"mssim" | ||
], | ||
"default": "libtpms" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "shell", | ||
"label": "build_test", | ||
"command": "make", | ||
"args": [ | ||
"-j", | ||
"${relativeFileDirname}/${fileBasenameNoExtension}", | ||
], | ||
"problemMatcher": [ | ||
"$gcc" | ||
], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"detail": "Build single test executable." | ||
}, | ||
{ | ||
"type": "shell", | ||
"label": "build_tcti_libtpms", | ||
"command": "make", | ||
"args": [ | ||
"-j", | ||
"src/tss2-tcti/libtss2-tcti-libtpms.la", | ||
], | ||
"problemMatcher": [ | ||
"$gcc" | ||
], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": false | ||
}, | ||
"detail": "Build tcti-libtpms" | ||
} | ||
] | ||
} |