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

Not a supported test executable (Catch2 on remote ssh) #201

Closed
3 tasks done
gatopeich opened this issue May 15, 2020 · 11 comments
Closed
3 tasks done

Not a supported test executable (Catch2 on remote ssh) #201

gatopeich opened this issue May 15, 2020 · 11 comments
Labels
question Further information is requested vscode-remote

Comments

@gatopeich
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.

Describe the bug
I have a simple Catch2 test suite that runs fine from command line and vscode tasks.
However its test cases don't get listed in Test Explorer.
Here is a sample run of it with "-l":

{workspace-root} $ build/Tests -l
All available test cases:
  Load library and register callbacks
      [init]
1 test case

Desktop

  • Extension Version: latest
  • VS Code Version: latest
  • Catch2 / Google Test / DOCTest Version: Catch2 v2.12.1
  • OS Type and Version: Ubuntu 18 LTS
  • Using remote-ssh/docker/wsl?: Yes, remote-ssh

Log (optional but recommended)

[2020-05-15 12:48:20.146] [DEBUG] Not a test executable: /home/$USER/{workspace-root}/build/Tests reason: [Error: Not a supported test executable: /home/$USER/{workspace-root}/build/Tests
 output: 
        at /home/$USER/.vscode-server/extensions/matepek.vscode-catch2-test-adapter-3.2.0/out/dist/main.js:23:34044
        at async e.ExecutableConfig.load (/home/$USER/.vscode-server/extensions/matepek.vscode-catch2-test-adapter-3.2.0/out/dist/main.js:23:27220)
        at async Promise.all (index 0)
        at async o.load (/home/$USER/.vscode-server/extensions/matepek.vscode-catch2-test-adapter-3.2.0/out/dist/main.js:22:29374)]
[2020-05-15 12:48:20.146] [INFO] load finished 0
@matepek
Copy link
Owner

matepek commented May 15, 2020

Please attach the output of the result calling the executable with —help
And with "[.],*" --verbosity high --list-tests --use-colour no

@matepek matepek added the question Further information is requested label May 15, 2020
@gatopeich
Copy link
Author

Tests --help.txt

@gatopeich
Copy link
Author

$ build/Tests "[.],*" --verbosity high --list-tests --use-colour no
Matching test cases:
  Load library and register callbacks
    Tests.cpp:17
    (NO DESCRIPTION)
      [init]
1 matching test case

@matepek
Copy link
Owner

matepek commented May 15, 2020

Oh man that's tricky.
I have a similar issue with docker. I'm almost sure that it is not related to this extension but the vscode or vscode-remote.

What we can do that if you could send me over the file I can try it on my Ubuntu VM.
Or the best would be if I could remote SSH to your computer. (if the first doesn't work we still can try this). I have a vpn server if you don have public IP.

@gatopeich
Copy link
Author

gatopeich commented May 15, 2020

I am seeing the same in non-remote work.

Attaching a simple test built on Ubuntu 18:
DumbTests.gz (gunzip before run)

from this code:

#define CATCH_CONFIG_MAIN
#include "catch.hpp"

TEST_CASE("Catch2 works", "[init]")
{
    REQUIRE(true);
}

@matepek
Copy link
Owner

matepek commented May 15, 2020

Hm... try to add execution flag. chmod +x Tests.
And refresh the test list.
Is it help?

@gatopeich
Copy link
Author

Okay I found the issue: there was a dynamic linked library with a relative path.
It could only run from the workspace root dir.

@matepek
Copy link
Owner

matepek commented May 15, 2020

You can change the cwd. That would solve your problem with the extension.

@gatopeich gatopeich reopened this May 15, 2020
@gatopeich
Copy link
Author

Thanks that worked!

@eliveikis
Copy link

@matepek Before I file a new bug, could this be related to the issue I've been having on Windows VSCode connecting to WSL2 ubuntu 18.04? No tests show in the explorer, nor do the Run|Debug|Etc options show above the individual tests.

Microsoft has this document to reference for extension issues in WSL2:
https://code.visualstudio.com/docs/remote/troubleshooting#_extension-tips

@matepek
Copy link
Owner

matepek commented Sep 11, 2020

Assuming that "this" means this issue(201): yes, this can cause symptoms like that.

@khteh khteh mentioned this issue Oct 18, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested vscode-remote
Projects
None yet
Development

No branches or pull requests

3 participants