tests: fix TTY check in virTestUseTerminalColors()

Since colors would be used when writing to stdout, then check that
stdout is a TTY, instead of stdin.

This avoids the usage of terminal color codes when the output is
directed to file.
This commit is contained in:
Pino Toscano 2017-11-09 13:31:03 +01:00 committed by Andrea Bolognani
parent 9324f67a57
commit ef5c8a91aa

View File

@ -92,7 +92,7 @@ bool virTestOOMActive(void)
static int virTestUseTerminalColors(void)
{
return isatty(STDIN_FILENO);
return isatty(STDOUT_FILENO);
}
static unsigned int