diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 00000000..bb689e78 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -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 +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..23c615d8 --- /dev/null +++ b/.vscode/launch.json @@ -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" +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..7e20937d --- /dev/null +++ b/.vscode/tasks.json @@ -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" +} \ No newline at end of file