]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add module tests to launch.json
authorNick Porter <nick@portercomputing.co.uk>
Mon, 1 Aug 2022 09:37:53 +0000 (10:37 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Tue, 9 Aug 2022 09:33:50 +0000 (10:33 +0100)
.vscode/launch.json

index 1cbb1f8b8a28ba2a4f2ce8526dc1445a3438f0f3..cfc3a396e31743363f4b3cb48fe9eaefdc5bf99b 100644 (file)
                                 {"name": "FR_LIBRARY_PATH", "value": "${workspaceFolder}/build/lib/local/.libs" },
                                 {"name": "LD_LIBRARY_PATH", "value": "${workspaceFolder}/build/lib/local/.libs" }
                         ]
+                },
+                {
+                        "type": "cppdbg",
+                        "request": "launch",
+                        "name": "Module Test (gdb)",
+                        "program": "${workspaceFolder}/build/bin/local/unit_test_module",
+                        "cwd": "${workspaceFolder}",
+                        "args": [
+                                "-D",
+                                "share/dictionary",
+                                "-d",
+                                "src/tests/modules/",
+                                "-i",
+                                "build/tests/modules/${input:module}/${input:moduletest}.attrs",
+                                "-f",
+                                "build/tests/modules/${input:module}/${input:moduletest}.attrs",
+                                "-r",
+                                "build/tests/modules/${input:module}/${input:moduletest}",
+                                "-xx"
+                        ],
+                        "environment": [
+                                { "name": "FR_LIBRARY_PATH", "value": "${workspaceFolder}/build/lib/local/.libs" },
+                                { "name": "LD_LIBRARY_PATH", "value": "${workspaceFolder}/build/lib/local/.libs" },
+                                { "name": "MODULE_TEST_DIR", "value": "src/tests/modules/${input:module}/"},
+                                { "name": "MODULE_TEST_UNLANG", "value": "src/tests/modules/${input:module}/${input:moduletest}.unlang" }
+                        ],
                 }
         ],
         "inputs": [
                         "id": "bintest",
                         "type": "promptString",
                         "description": "Bin test to run"
+                },
+                {
+                        "id": "module",
+                        "type": "promptString",
+                        "description": "Module to test"
+                },
+                {
+                        "id": "moduletest",
+                        "type": "promptString",
+                        "description": "Test to run"
                 }
         ]
 }