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

Can not get a path pattern with multiple curly braces to work #233

Closed
4 tasks done
emmenlau opened this issue Oct 30, 2020 · 4 comments
Closed
4 tasks done

Can not get a path pattern with multiple curly braces to work #233

emmenlau opened this issue Oct 30, 2020 · 4 comments

Comments

@emmenlau
Copy link

Checklist

  • The issue is about this extension and NOT about a fork.
  • Check the known issues list.
  • The latest version of the extension was used.
  • It is not related to remote-vscode or I checked the following issue

Describe the bug

I'm trying to load tests and benchmarks from different directories, because one is for Debug and one is for Release builds. My globbing pattern is "pattern": "${os_env:BDASOFTTEMP}/{Debug,Release}/BDAImageAnalysis/*{Test,Benchmark}*",. But that does not work, the adapter will not find any tests or benchmarks. When I remove the first set of curly braces {Debug,Release} and replace it with only Debug or Release, everything works, but it finds only either the tests or the benchmarks (depending which folder I set). Is it possible that a pattern can not have more than one set of curly braces pattern? Is there a known workaround or a way to add both folders?

To Reproduce

Set the settings.json to

{
    "testMate.cpp.debug.breakOnFailure": false,
    "testMate.cpp.test.advancedExecutables": [
        {
            "name": "${filename}",
            "pattern": "${os_env:BDASOFTTEMP}/Debug/BDAImageAnalysis/*{test,Test,TEST}*",
        }
    ]
}

Desktop

  • Extension Version: 3.5.0
  • VS Code Version: 1.50.0
  • Catch2 / Google Test / DOCTest Version: Google Test v1.10.0
  • OS Type and Version: Linux Ubuntu 20.04
  • Using remote-ssh/docker/wsl?: No
@matepek
Copy link
Owner

matepek commented Oct 31, 2020

You didn't attached the full log so I'm just guessing but it might be a vscode limitation. I'm using vscode.workspace.createFileSystemWatcher.

For workaround you can try this:

{
    "testMate.cpp.debug.breakOnFailure": false,
    "testMate.cpp.test.advancedExecutables": [
        {
            "name": "${filename}",
            "description": "(Debug)",
            "pattern": "${os_env:BDASOFTTEMP}/Debug/BDAImageAnalysis/*Test*",
        },
        {
            "name": "${filename}",
            "description": "(Release)",
            "pattern": "${os_env:BDASOFTTEMP}/Release/BDAImageAnalysis/*Test*",
        },
        {
            "name": "${filename}",
            "description": "(Debug)",
            "pattern": "${os_env:BDASOFTTEMP}/Debug/BDAImageAnalysis/*Benchmark*",
        },
        {
            "name": "${filename}",
            "description": "(Release)",
            "pattern": "${os_env:BDASOFTTEMP}/Release/BDAImageAnalysis/*Benchmark*",
        }
    ]
}

@matepek
Copy link
Owner

matepek commented Nov 1, 2020

I'm closing, let me know if it didn't slove.

@matepek matepek closed this as completed Nov 1, 2020
@emmenlau
Copy link
Author

emmenlau commented Nov 1, 2020

Awesome, thanks again for all the great help!

@emmenlau
Copy link
Author

emmenlau commented Nov 2, 2020

It works perfect, thanks!

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

2 participants