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

feat: print result symbol in addition to color #354

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

mxinden
Copy link
Contributor

@mxinden mxinden commented Feb 24, 2024

Previously the test abbreviation was printed in green, grey and red depending on the result. Colors are not available in all environments, e.g. when printing into a file.

This commit adds symbols in addition to colors.

+------+--------+
|      |  neqo  |
+------+--------+
| neqo | ✓(H,S) |
|      |  ?()   |
|      |  ✕(R)  |
+------+--------+

Any format works for me. Using parenthesis first came to mind.

Previously the test abbreviation was printed in green, grey and red depending on
the result. Colors are not available in all environments, e.g. when printing
into a file.

This commit adds symbols in addition to colors.

+------+--------+
|      |  neqo  |
+------+--------+
| neqo | ✓(H,S) |
|      |  ?()   |
|      |  ✕(R)  |
+------+--------+
@marten-seemann
Copy link
Collaborator

Is it possible to detect color support?

@mxinden
Copy link
Contributor Author

mxinden commented Feb 26, 2024

Is it possible to detect color support?

Probably not that hard. That said, say that you want to both print the results to screen and into a file:

python3 run.py --test handshake | tee output

Would one disable the symbols here in favor of colors? Fine for the results printed on screen. Not great for the one reading output later on.

@marten-seemann does that make sense?

@marten-seemann
Copy link
Collaborator

You're right, this doesn't work well when piping output.

@marten-seemann marten-seemann merged commit 149e197 into quic-interop:master Feb 27, 2024
1 check passed
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