DavidSchuldenfrei / gtest-adapter

Other
18 stars 9 forks source link

Remote unit tests not supported #30

Open wcwagner opened 5 years ago

wcwagner commented 5 years ago

Hello,

I have a launch.json for my unit tests that is run in a docker container. This is necessary since my host machine does not have all the dependencies required for running my project. Below is my sample launch.json

{
            "name": "Unit tests",
            "type": "cppdbg",
            "request": "launch",
            "program": "/path/to/container/unit_test/unit_test.tsk",
            "cwd": "/path/to/container/cwd",
            "MIMode": "gdb",
            "pipeTransport": {
                "pipeCwd": "${workspaceFolder}",
                "pipeProgram": "docker-compose",
                "pipeArgs": ["exec", "-T", "build_container", "/bin/bash", "-c"],
                "debuggerPath": "/bin/gdb"
            },
            "sourceFileMap": {
                "/path/to/container/workspace": "${workspaceFolder}/",
            }
        },

The problem occurs here, which from what I gather looks for the file on the host machine.

Is it possible at all to setup this test adapter with a remote environment (e.g. docker, ssh)?

Thanks!

DavidSchuldenfrei commented 5 years ago

@wcwagner I have limited experience with Docker, and hadn't thought of this case. I will try to look into it

dquist commented 5 years ago

Now that VS Code Remote has been released with native container support, using the pipeTransport should no longer be necessary.

https://code.visualstudio.com/docs/remote/containers