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

Qt args interfere with CATCH, prevent tests from running. #605

Closed
SebastianTroy opened this issue Mar 7, 2016 · 2 comments
Closed

Qt args interfere with CATCH, prevent tests from running. #605

SebastianTroy opened this issue Mar 7, 2016 · 2 comments

Comments

@SebastianTroy
Copy link

SebastianTroy commented Mar 7, 2016

Catch assumes that all command line arguments are for it.

Qt by default passes the path to the executable as a programs first arg. I believe that this is filtering which tests are run even though the arg is completely unrelated to Catch. I can get around this by modifying argc and argv before passing them to catch but this is ugly and prone to breaking.

Perhaps CATCH should ignore strings with the .exe extension? Or be more selective in what it interprets as a test filter?

Even better would be if Catch could ignore any arguments not sandwiched between an optional "catchstart" and "catchend" arg pair, allowing for instances where Catch is being run within a program that requires args unrelated to catch.

@horenmar
Copy link
Member

horenmar commented Mar 8, 2017

First of all, does first argument mean argv[0]? Because if so, that is standard behaviour, and Catch accounts for that properly. If that means argv[1], why would it do that?

Anyway, ignoring arguments ending in .exe would maybe work on Windows, but not on other systems, and if you need to pass arguments that are not meant for Catch to Catch test binary, then you really need your own main and fix them up.

@horenmar horenmar added the Resolved - pending review Issue waiting for feedback from the original author label Mar 8, 2017
@horenmar
Copy link
Member

Since there hasn't been a follow up in 3 weeks, I am going to close this issue.

@horenmar horenmar removed the Resolved - pending review Issue waiting for feedback from the original author label Mar 29, 2017
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