Init Commit: Moved bproto to seperate repo
This commit is contained in:
77
.vscode/launch.json
vendored
Normal file
77
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
{
|
||||
// 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": [
|
||||
{
|
||||
"name": "Python: bproto compiler Python",
|
||||
"type": "debugpy",
|
||||
"program": "src/main.py",
|
||||
"console": "integratedTerminal",
|
||||
"args": [
|
||||
"-i", "test/test_protocol.bproto",
|
||||
"-o", "test/python/bproto/",
|
||||
"-t", "python"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Pytest: Python Backend Tests",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "test/runner.py",
|
||||
"console": "integratedTerminal",
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Tests C Debug (gdb)",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/test_runner",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/test/backend_output/c",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Set Disassembly Flavor to Intel",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"preLaunchTask": "CMake: Build C Tests"
|
||||
},
|
||||
{
|
||||
"name": "Tests C Python Integration Debug (gdb)",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/test_integration_python",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/test/backend_output/c",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Set Disassembly Flavor to Intel",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"preLaunchTask": "CMake: Build C Tests"
|
||||
}
|
||||
]
|
||||
}
|
||||
33
.vscode/settings.json
vendored
Normal file
33
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"cmath": "cpp",
|
||||
"type_traits": "cpp",
|
||||
"__nullptr": "cpp",
|
||||
"target": "cpp",
|
||||
"bproto_encdec.h": "c",
|
||||
"functional": "c",
|
||||
"__locale": "c",
|
||||
"bproto_package_ids.h": "c",
|
||||
"bproto_package_structs.h": "c",
|
||||
"random": "cpp",
|
||||
"algorithm": "cpp",
|
||||
"suit.h": "c",
|
||||
"stdint.h": "c",
|
||||
"hcp_message.h": "c"
|
||||
},
|
||||
"cmake.sourceDirectory": "/home/alexander/Projects/tumRobotic25/protocolGenerator/test/output/c",
|
||||
"coverage-gutters.coverageFileNames": [
|
||||
"coverage/cov_c.xml",
|
||||
"coverage/cov_python.xml",
|
||||
],
|
||||
"coverage-gutters.showGutterCoverage": false,
|
||||
"coverage-gutters.showLineCoverage": true,
|
||||
"flake8.enabled": true,
|
||||
"flake8.args": [
|
||||
"--config=.flake8",
|
||||
"--count"
|
||||
],
|
||||
"flake8.ignorePatterns": [
|
||||
"src/gen/*.py"
|
||||
]
|
||||
}
|
||||
155
.vscode/tasks.json
vendored
Normal file
155
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,155 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{"label": "Antlr: Generate Parser",
|
||||
"type": "shell",
|
||||
"command": "antlr4",
|
||||
"args": [
|
||||
"-Dlanguage=Python3",
|
||||
"-visitor",
|
||||
"-o",
|
||||
"src/gen",
|
||||
"bprotoV1.g4"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{"label": "Bproto compiler C",
|
||||
"type": "shell",
|
||||
"command": "${command:python.interpreterPath}",
|
||||
"args": [
|
||||
"src/main.py",
|
||||
"-i", "test/test_protocol.bproto",
|
||||
"-o", "test/backend_output",
|
||||
"-t", "c"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{"label": "CMake: Configure C Test",
|
||||
"type": "cmake",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/test/output/c"
|
||||
},
|
||||
"command": "configure",
|
||||
"args": [
|
||||
"-DCMAKE_BUILD_TYPE=Debug"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{"label": "CMake: Build C Tests",
|
||||
"type": "cmake",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/test/output/c"
|
||||
},
|
||||
"command": "build",
|
||||
"args": [
|
||||
"all"
|
||||
],
|
||||
"problemMatcher": ["$gcc"],
|
||||
"dependsOn": ["Bproto compiler C"],
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": true,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": true,
|
||||
"clear": true
|
||||
}
|
||||
},
|
||||
{"label": "Run C Tests",
|
||||
"type": "shell",
|
||||
"command": "build/test_runner",
|
||||
"problemMatcher": ["$gcc"],
|
||||
"dependsOn": ["CMake: Build C Tests"],
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": true,
|
||||
"clear": true
|
||||
}
|
||||
},
|
||||
{"label": "gcovr: Generate C Coverage",
|
||||
"type": "shell",
|
||||
"command": "gcovr",
|
||||
"args": [
|
||||
"-p", "--txt",
|
||||
"--xml", "coverage/cov_c.xml",
|
||||
"--root", ".",
|
||||
"--object-directory", "build/CMakeFiles/test_runner.dir/src/"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"dependsOn": ["Run C Tests"],
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": true,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": true,
|
||||
"clear": true
|
||||
}
|
||||
},
|
||||
|
||||
{"label": "Run Compiler Python",
|
||||
"type": "shell",
|
||||
"command": "${command:python.interpreterPath}",
|
||||
"args": [
|
||||
"src/main.py",
|
||||
"-i", "test/test_protocol.bproto",
|
||||
"-o", "test/backend_output",
|
||||
"-t", "python"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{"label": "pytest coverage",
|
||||
"type": "shell",
|
||||
"command": "${command:python.interpreterPath}",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"TEST_COVERAGE": "1" // This cause integration tests to be ignored, as they push up the coverage
|
||||
}
|
||||
},
|
||||
"args": [
|
||||
"-m",
|
||||
"pytest",
|
||||
"--cov",
|
||||
"--cov-report=term",
|
||||
"--cov-report=xml",
|
||||
],
|
||||
"problemMatcher": [],
|
||||
"dependsOn": ["Run Compiler Python"]
|
||||
},
|
||||
{"label": "pytest test",
|
||||
"type": "shell",
|
||||
"command": "${command:python.interpreterPath}",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
},
|
||||
"args": [
|
||||
"-m",
|
||||
"pytest",
|
||||
"--cov",
|
||||
"--cov-report=term",
|
||||
"--cov-report=xml",
|
||||
],
|
||||
"problemMatcher": [],
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": true,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": true,
|
||||
"clear": true
|
||||
},
|
||||
"dependsOn": [ "Run Compiler Python" ]
|
||||
},
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user