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

Cross compiled executable not supported #216

Closed
dwjbosman opened this issue Jul 27, 2020 · 6 comments
Closed

Cross compiled executable not supported #216

dwjbosman opened this issue Jul 27, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@dwjbosman
Copy link

Checklist

Describe the bug

I have installed a cross compiler for Raspberry Pi (ARM). I am able to compile an executable including Catch2 support.

Testmate won't discover tests. There is an error message "Error: Not a supported test executable"

  • I can execute the program using qemu-arm-static and see the Catch2 test report
  • If I change the compiler to a standard x86 gcc, the tests are discovered.

Desktop

Extension Version: 3.2.12
VS Code Version: 1.47.1
Catch2 / Google Test / DOCTest Version: Catch2 v2.13.0-1-g229cc482
OS Type and Version: Windows 10
Using remote-ssh/docker/wsl?: docker on wsl2

Log

See below:

`

[2020-07-27 10:37:22.618] [INFO] load called
[2020-07-27 10:37:22.618] [DEBUG] canceled
[2020-07-27 10:37:22.618] [INFO] load started
[2020-07-27 10:37:22.618] [INFO] context:executables [ { name: 'blaat', pattern: 'build/imaxi2_test' } ]
[2020-07-27 10:37:22.618] [INFO] pattern build/imaxi2_test /home/dinne/isenseit/firmwares/raspberry/raspberry-firmware {
isAbsolute: false,
absPattern: '/home/dinne/isenseit/firmwares/raspberry/raspberry-firmware/build/imaxi2_test',
isPartOfWs: true,
relativeToWsPosix: 'build/imaxi2_test'
}
[2020-07-27 10:37:22.707] [DEBUG] Checking file for tests: /home/dinne/isenseit/firmwares/raspberry/raspberry firmware/build/imaxi2_test
[2020-07-27 10:37:22.715] [DEBUG] Not a test executable: /home/dinne/isenseit/firmwares/raspberry/raspberry firmware/build/imaxi2_test reason: [Error: Not a supported test executable: /home/dinne/isenseit/firmwares/raspberry/raspberry-firmware/build/imaxi2_test

output:
at /home/_vscode/.vscode-server-insiders/extensions/matepek.vscode-catch2-test-adapter-3.2.12/out/dist/main.js:65:31530
at async e.ExecutableConfig.load (/home/_vscode/.vscode-server-insiders/extensions/matepek.vscode-catch2-test-adapter-3.2.12/out/dist/main.js:65:23639)
at async Promise.all (index 0)
at async s.load (/home/_vscode/.vscode-server-insiders/extensions/matepek.vscode-catch2-test-adapter-3.2.12/out/dist/main.js:64:33463)
at async e.SharedVariables._shared.u.SharedVariables.e [as loadWithTask] (/home/_vscode/.vscode-server-insiders/extensions/matepek.vscode-catch2-test-adapter-3.2.12/out/dist/main.js:64:10172)]
[2020-07-27 10:37:22.715] [INFO] load finished 0

`

@matepek
Copy link
Owner

matepek commented Jul 27, 2020

Please check this: and let me know if that helped you or not: #201

@dwjbosman
Copy link
Author

dwjbosman commented Jul 27, 2020

I checked the issue #201
Running from the command line

qemu-arm-static imaxi2_test "[.],*" --verbosity high --list-tests --use-colour no

Matching test cases:
  Encode Function
  firmwares/raspberry/raspberry-firmware/main.cpp:12
    (NO DESCRIPTION)
      [encode]
1 matching test case

In the issue there is a mention that the way the libraries are linked can be a problem. In my case the executable is statically linked.

@matepek
Copy link
Owner

matepek commented Jul 27, 2020

I guess the following is not working.

imaxi2_test "[.],*" --verbosity high --list-tests --use-colour no

do you see the problem?
You're using an emulator to run your arm executables.

@dwjbosman
Copy link
Author

Ah, of course,

I need to take more breakes...

Is it possible to configure the plugin so that it would include a call to the emulator?

@matepek
Copy link
Owner

matepek commented Jul 27, 2020

Not yet, but I will implement it. It seems a good feature.

@matepek matepek added the enhancement New feature or request label Jul 27, 2020
@matepek
Copy link
Owner

matepek commented Jul 27, 2020

Check testMate.advancedExecutables.executionWrapper. It is intended to solve your issue

@matepek matepek closed this as completed Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants