CppUTest-Test-Adapter icon indicating copy to clipboard operation
CppUTest-Test-Adapter copied to clipboard

Workspace path substitution accepts only some variables

Open w8jcik opened this issue 1 year ago • 3 comments

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

w8jcik avatar Sep 21 '23 17:09 w8jcik

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

bneumann avatar Apr 14 '24 10:04 bneumann

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

ben-edna avatar May 24 '24 15:05 ben-edna

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 ;)

bneumann avatar Oct 06 '24 16:10 bneumann