bneumann/CppUTest-Test-Adapter

Workspace path substitution accepts only some variables

w8jcik opened this issue · 3 comments

w8jcik commented

In particular paths "cpputestTestAdapter.testExecutable" and "cpputestTestAdapter.testExecutablePath" accept workspaceFolder but not workspaceRoot.

I am not sure if workspaceFolder should be used instead of workspaceRoot for some reason, but this behavior is not consistent.

Other entries in settings.json accept workspaceRoot.

Additional issue is that with workspaceRoot used, there is no warning or error, just the test panel is empty. At least log should say something that executable doesn't exist.

The least confusing would be to offer notification.

VSCode 1.82.2
CppUTest Test Adapter 1.1.0

I added some log information in the latest version. I know this is confusing but I am bound to replace everything manually unless microsoft/vscode#46471 is fixed

Also workspaceFolders for multi-root workspaces are not accepted.

e.g.

    "folders": [
        {
            "name": "Tests",
            "path": "../Tests"
        },
        {
            "name": "Source",
            "path": "../Src"
        }
    ],
    "settings": {
        "cpputestTestAdapter.testExecutable": "${workspaceFolder:Tests}/Unit/build/myTest.exe",
        "cpputestTestAdapter.testExecutablePath": "${workspaceFolder:Tests}/Unit/build"
    },

The tests are also indexed twice with the above workspace as can be seen here:

image

I am really sorry, I can see this is a nice feature, but I don't have the capacity at the moment to implement it. I am, however, accepting PRs ;)