Skip to content

Commit

Permalink
tooling: Add VS Code project configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
CzBalti authored and cassava committed Jun 10, 2024
1 parent 4733764 commit d621bcd
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/g++",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "linux-gcc-x64",
//run `make configure` to create the file
"compileCommands": "${workspaceFolder}/compile_commands.json"
}
],
"version": 4
}
76 changes: 76 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"configurations": [
{
"name": "Debug cloe",
"type": "cppdbg",
"request": "launch",
"program": "${input:get_executable_path}",
"args": [
"run",
"--write-output",
"${workspaceFolder}/${input:get_test_case}",
//Example to run a specific test-case
//"${workspaceFolder}/tests/test_lua04_schedule_test.lua",
//Example to run a specific smoketest
//"-u",
//"smoketest",
//"${workspaceFolder}/tests/test_engine_replica_smoketest_temp.json",
],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"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": "Build Cloe",
"miDebuggerPath": "/usr/bin/gdb",
"envFile": "${input:get_shell_path}"
}
],
"inputs": [
{
"type": "command",
"id": "get_test_case",
"command": "shellCommand.execute",
"args":{
"command":"ls tests/*.lua",
"cwd": "${workspaceFolder}"
}
},
{
"type": "command",
"id": "get_shell_path",
"command": "shellCommand.execute",
//bash magic to set CLOE_SHELL variable and get the value of it
"args": {
"command": "bash -c \"source <(PYTHONPATH=\"${workspaceFolder}/cli\" python3 -m cloe_launch activate tests/conanfile_all.py) && printenv CLOE_SHELL\"",
"cwd": "${workspaceFolder}",
"useSingleResult": "true"
}
},
{
"type": "command",
"id": "get_executable_path",
"command": "shellCommand.execute",
//bash magic to set CLOE_ENGINE variable and get the value of it
"args": {
//"command": "bash -c \"source <(cloe-launch activate tests/conanfile_all.py) && printenv CLOE_ENGINE\"",
"command": "bash -c \"source <(PYTHONPATH=\"${workspaceFolder}/cli\" python3 -m cloe_launch activate tests/conanfile_all.py) && printenv CLOE_ENGINE\"",
"cwd": "${workspaceFolder}",
"useSingleResult": "true"
}
}
],
"version": "2.0.0"
}
41 changes: 41 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"tasks": [
{
"type": "shell",
"label": "Build Cloe",
"command": "make",
"args": [
"all",
"BUILD_TYPE=Debug"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "Task generated by Debugger."
},
{
"type": "shell",
"label": "Build Cloe (without tests)",
"command": "make",
"args": [
"all",
"CONAN_OPTIONS=\"-c tools.build:skip_test=1\"",
"CONAN_RUN_TESTS=0",
"BUILD_TYPE=Debug"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "Task generated by Debugger."
},
],
"version": "2.0.0"
}

0 comments on commit d621bcd

Please sign in to comment.