Skip to content

libtest output is not colored #2292

Closed
@RalfJung

Description

@RalfJung

cargo miri test output is not colored the same way cargo test is: the output that is generated inside Miri (the libtest runner) uses no colors. I think this is probably because of the hack where we remove the TERM environment variable even with isolation disabled -- that makes libtest think that the terminal does not support color so it falls back to no colors. (EDIT: looks like I am wrong, see below.)

We remove the TERM variable because having it makes libtest startup super slow (that was #1702). Maybe we need another work-around for this problem, like adding a cfg(miri) somewhere to skip the slow code -- or actually making Miri less slow on that code.^^

@saethlin this is the bug you mentioned in one of your PRs; it has nothing to do with --color=always (other than, even with --color=always, libtest still uses no color unless TERM indicates that the terminal supports color).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-shimsArea: This affects the external function shimsA-uxArea: This affects the general user experienceC-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions