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
ISPN-8414 Colored testsuite progress #5520
ISPN-8414 Colored testsuite progress #5520
Conversation
Need to find a way to suppress colors when running in CI |
09e5a52
to
7a4d6bf
Compare
private final boolean useColor; | ||
|
||
public TestSuiteProgress() { | ||
useColor = System.getenv("JENKINS_HOME") == null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this is really necessary... jansi uses isatty
to avoid writing the escape codes when output is redirected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I see that isatty
check is in AnsiConsole
, and you're not using it... still, when I run the build from my Python script (which uses Popen
to parse the output and set the test count in the title), the colours just disappear.
Checking isatty is pointless, since we use surefire's fork which filters the output. In fact System.console() returns null when running the testsuite. |
@tristantarrant I forgot surefire is already doing one redirect... but that makes the fact that You could avoid the Jenkins-specific check by using |
7a4d6bf
to
8d24a86
Compare
@danberindei I have made some changes:
|
Integrated, thanks Tristan! |
https://issues.jboss.org/browse/ISPN-8414