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 --color to test binary options #14760

Closed
wants to merge 1 commit into from

Conversation

sfackler
Copy link
Member

@sfackler sfackler commented Jun 9, 2014

No description provided.

@alexcrichton
Copy link
Member

I'm a little worried about enabling this for all concurrency levels. We capture the test task's output, but we don't capture the sub-tasks of those tasks. For example, synctest spawns tons of tasks and almost none of the output is captured.

Other than that, though, this looks good to me.

@sfackler
Copy link
Member Author

sfackler commented Jun 9, 2014

Subtasks don't inherit their supertask's IO sources?

@alexcrichton
Copy link
Member

Not currently, but I would like them to!

@sfackler
Copy link
Member Author

sfackler commented Jun 9, 2014

Want me to add back the concurrency level check to the AutoColor logic until then? Colorized output is so nice though :(

@alexcrichton
Copy link
Member

r=me if you bring back the check for get_concurrency() == 1. I do agree that colorization is highly desirable, and it could be that the sub-task problem isn't that big of a problem. I wanted to bring it up as a concern, but I'd be ok with saying "that's how it is" if we always colorize, not too many tests generate sub-tasks.

@sfackler
Copy link
Member Author

sfackler commented Jun 9, 2014

Is there an issue for IO inheritance?

@alexcrichton
Copy link
Member

Not that I know of. My idea was to have a set of cloneable task local data, but I'm not sure how well that will pan out.

@sfackler sfackler changed the title Colorize test output by default and add --color to options Add --color to test binary options Jun 9, 2014
@huonw
Copy link
Member

huonw commented Jun 9, 2014

Travis failed.

task, allow printing directly"))
task, allow printing directly"),
getopts::optopt("", "color", "Configure coloring of output:
auto = colorize if stdout is a tty and tests are run on serially (default);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean for this to be indented 12 spaces in the final output?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not. Getopts strips newlines, looks like.

It uses the same behavior as rustc's.
bors added a commit that referenced this pull request Jun 10, 2014
Closes #14611 (std: Remove the as_utf16_p functions)
Closes #14694 (Num cleanup)
Closes #14760 (Add --color to test binary options)
Closes #14763 (std: Move dynamic_lib from std::unstable to std)
Closes #14766 (Add test for issue #13446)
Closes #14769 (collections: Add missing Default impls)
Closes #14773 (General nits)
Closes #14776 (rustdoc: Correctly classify enums/typedefs)
@bors bors closed this in #14783 Jun 10, 2014
@sfackler sfackler deleted the test-color branch November 26, 2016 05:54
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 5, 2023
minor: Hide deps panel outside of Rust projects and set missing category

Closes rust-lang#14760
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.

4 participants