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

add --extra-info flag #934

Merged
merged 4 commits into from
Jun 25, 2017
Merged

add --extra-info flag #934

merged 4 commits into from
Jun 25, 2017

Conversation

BMBurstein
Copy link
Contributor

this will add line info to test lists, and test descriptions to the long
form of the test list

Related to issue #930

this will add line info to test lists, and test descriptions to the long
form of the test list
@horenmar
Copy link
Member

I tested this quickly and I am willing to merge it*, but I found what I would consider a bug in the implementation of --extra-info:

If I pass only --extra-info option to Catch binary, it behaves as if no arguments were passed (all tests are run). This is different from all other list X commands, and even though it isn't named list-*, I think user would expect it to behave like one (especially since its description says "list more info").

  • I didn't have time to look through the code yet, so standard disclaimers apply.

@horenmar
Copy link
Member

I decided to make some changes, it is now --list-extra-info and behaves like other --list-* flags, meaning that it lists tests on its own and prevents execution of tests.

Also improved the CLI description a bit.

@BMBurstein
Copy link
Contributor Author

Sorry, I saw your comment but hadn't had a chance to fix it myself.
I am wondering if I am going about this the wrong way. My intention was to make more info available for external runners to use, but for that maybe instead of adding more info to the existing lists, would it make more sense to create a new list command --list-parseable or something similar, which will list tests in a documented, parser-friendly format instead of a screen-friendly one? The format would probably include all the info available on a test (name, description, line info, tags, etc.) on a single line, with the different fields separated by some delimiter.
Would that be a better idea than the current one? Or maybe leave this already and add also the parser-friendly list command?

@horenmar
Copy link
Member

It is quite likely the wrong solution, but we had a discussion with Phil and we are willing to merge this in at least temporarily. Routing list outputs through reporters, so they can format the output accordingly, and introducing verbosity levels would be preferred, but I have no idea when that would make it in.

@BMBurstein
Copy link
Contributor Author

Routing list outputs through reporters, so they can format the output accordingly, and introducing verbosity levels would be preferred, but I have no idea when that would make it in.

I would like to try working on this, but am unsure where to do this. It would probably involve some slight breaking changes, at least to the command line. Should I base this on the master branch or on dev-modernize? I am assuming that the later is the work on a Catch v2? How close is that to becoming stable?

@horenmar
Copy link
Member

@BMBurstein A preview of Catch v2 should be released relatively soon, but it being preview means that breaking changes might still get in afterwards.

If you want to try your hand at making this change, I think you should base your work on dev-modernize.

@horenmar horenmar merged commit 8a14af7 into catchorg:master Jun 25, 2017
@BMBurstein BMBurstein deleted the more_info branch June 25, 2017 17:39
philsquared pushed a commit that referenced this pull request Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants