Skip to content

feat: reinterpret -q or --quite to show raw output from cargo test#28

Draft
zjp-CN wants to merge 1 commit into
josecelano:mainfrom
zjp-CN:forward-cargo-test-content2
Draft

feat: reinterpret -q or --quite to show raw output from cargo test#28
zjp-CN wants to merge 1 commit into
josecelano:mainfrom
zjp-CN:forward-cargo-test-content2

Conversation

@zjp-CN
Copy link
Copy Markdown
Collaborator

@zjp-CN zjp-CN commented Sep 27, 2023

Ref: #5

By default, -q is not passed, meaning raw output is forwarded as cargo test is running.
If -q is passed in, don't display raw output, show test tree directly.

Note: this commit also makes --color default to always because not -q is the default, and we want forwarding looks pretty in color.

Press Enter to clear the screen to show the test tree:

clear-raw-output.mp4

Some questions:

  • Do we need this? / Do we need both the outputs from two CLIs?
    • Yes, because watching cargo test prints is fun and it's important to know the execution details in CI as well as unnecessary to run all test twice locally (cargo test + pretty-test)
    • No, why not run cargo test before this tool?
  • Do we need to stop befor viewing the output from pretty-test?

By default, `-q` is not passed, meaning raw output is forwarded as
cargo test is running.
If `-q` is passed in, don't display raw output, show test tree directly.

Note: this commit also makes `--color` default to `always` because not
`-q` is the default, and we want forwarding looks pretty in color.
@josecelano
Copy link
Copy Markdown
Owner

josecelano commented Sep 27, 2023

If tests take long to execute I would prefer to run cargo test once and I would like to have both outputs (I guess, is there something missing in the pretty output that is included in the normal one? If not, I would not care not to get the normal one. I would prefer the normal to be pretty. Other testing frameworks only have the pretty one. But I suppose that's because they are not executed in parallel maybe)

@josecelano
Copy link
Copy Markdown
Owner

Hi @zjp-CN I think I would just print the cargo test output while running and then the tree without pressing any key. If you want only the normal output, you can just run cargo test. For me, the normal output is just a "progress bar" and a log in case the pretty-test command fails.

@zjp-CN
Copy link
Copy Markdown
Collaborator Author

zjp-CN commented Oct 3, 2023

What kind of progress bar will it be? We don't know how many tests without running them I guess?

@josecelano
Copy link
Copy Markdown
Owner

What kind of progress bar will it be? We don't know how many tests without running them I guess?

I meant the cargo test output could be the "progress bar".

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

Successfully merging this pull request may close these issues.

2 participants