Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workspace path substitution accepts only some variables #51

Open
w8jcik opened this issue Sep 21, 2023 · 3 comments
Open

Workspace path substitution accepts only some variables #51

w8jcik opened this issue Sep 21, 2023 · 3 comments

Comments

@w8jcik
Copy link

w8jcik commented Sep 21, 2023

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

@bneumann
Copy link
Owner

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

@ben-edna
Copy link

ben-edna commented May 24, 2024

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

@bneumann
Copy link
Owner

bneumann commented Oct 6, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants