]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add unit tests launcher to launch.json
authorNick Porter <nick@portercomputing.co.uk>
Wed, 18 Jan 2023 10:53:17 +0000 (10:53 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 26 Jan 2023 08:28:30 +0000 (08:28 +0000)
.vscode/launch.json

index 6fe0706f9f918fdd144f4fbeef02b68170089b11..11c35ca0a897e057ab519483166f6cf50108770e 100644 (file)
                                         "text": "set solib-search-path ${workspaceFolder}"
                                 }
                         ]
+                },
+                {
+                        "type": "cppdbg",
+                        "request": "launch",
+                        "name": "Unit Test (gdb)",
+                        "program": "${workspaceFolder}/build/bin/local/unit_test_attribute",
+                        "cwd": "${workspaceFolder}",
+                        "args": [
+                                "-D",
+                                "share/dictionary",
+                                "-d",
+                                "src/tests/unit",
+                                "src/tests/unit/${input:unittest}.txt",
+                                "-xx"
+                        ],
+                        "environment": [
+                                { "name": "FR_LIBRARY_PATH", "value": "${workspaceFolder}/build/lib/local/.libs" },
+                                { "name": "LD_LIBRARY_PATH", "value": "${workspaceFolder}/build/lib/local/.libs" },
+                        ],
+                        "MIMode": "gdb",
+                        "setupCommands": [
+                                {
+                                        "description": "Set solib",
+                                        "text": "set solib-search-path ${workspaceFolder}"
+                                }
+                        ]
                 }
         ],
         "inputs": [
                         "id": "moduletest",
                         "type": "promptString",
                         "description": "Test to run"
+                },
+                {
+                        "id": "unittest",
+                        "type": "promptString",
+                        "description": "Test to run"
                 }
         ]
 }