Bug 107489
| Summary: | [chromium/mac] ninja build output includes [K ansi escape codes | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Nico Weber <thakis> |
| Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | dpranke, eric, evan, tony |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Nico Weber
http://build.webkit.org/builders/Chromium%20Mac%20Release/builds/53890/steps/compile-webkit/logs/stdio :
[3/1348] STAMP obj/Source/WebCore/WebCore.gyp/webcore_bindings_sources.actions_rules_copies.stamp[K
ninja writes this if it thinks it's writing to a "smart terminal". ninja's src/build.cc:
if (smart_terminal_ && !force_full_command) {
#ifndef _WIN32
printf("%s", to_print.c_str());
printf("\x1B[K"); // Clear to end of line.
fflush(stdout);
have_blank_line_ = false;
#else
smart_terminal_ is set like so:
smart_terminal_ = isatty(1) && term && string(term) != "dumb";
So for some reason stderr is from a tty on the mac build bot. Not sure why.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Nico Weber
From what I can tell, nothing in Tools/BuildSlaveSupport passes usePTY and the slaves config file doesn't say --usepty either.
Evan Martin
isatty(1) means it's checking stdout, not stderr, right?isatty(1) &
Nico Weber
Err yes, but that doesn't really make a difference :-)
Evan Martin
Yeah, was just briefly confused about the stderr in your message, making sure I wasn't missing something. :)
As a temp workaround you can export TERM=dumb. I think we added that specifically for these kinds of situations.
Nico Weber
Sure, but something on the bot must explicitly set the terminal to interactive. We should just find what does that and remove it (?).
Evan Martin
Idea: you could use ttyname() if you were willing to put a modified version of ninja on the bot.
Tony Chang
Per Nico's suggestion, I set usepty = 0 in buildbot.tac and restarted the bots that compile. It looks OK now.