提交 c2f36506 编写于 作者: T Tomáš Ryšavý 提交者: John Ferlan

tests: Rename virtTestUseTerminalColors to virTestUseTerminalColors.

This function doesn't follow our convention of naming functions.
上级 d77e453a
...@@ -89,7 +89,7 @@ bool virTestOOMActive(void) ...@@ -89,7 +89,7 @@ bool virTestOOMActive(void)
return testOOMActive; return testOOMActive;
} }
static int virtTestUseTerminalColors(void) static int virTestUseTerminalColors(void)
{ {
return isatty(STDIN_FILENO); return isatty(STDIN_FILENO);
} }
...@@ -187,17 +187,17 @@ virTestRun(const char *title, ...@@ -187,17 +187,17 @@ virTestRun(const char *title,
if (virTestGetVerbose()) { if (virTestGetVerbose()) {
if (ret == 0) if (ret == 0)
if (virtTestUseTerminalColors()) if (virTestUseTerminalColors())
fprintf(stderr, "\e[32mOK\e[0m\n"); /* green */ fprintf(stderr, "\e[32mOK\e[0m\n"); /* green */
else else
fprintf(stderr, "OK\n"); fprintf(stderr, "OK\n");
else if (ret == EXIT_AM_SKIP) else if (ret == EXIT_AM_SKIP)
if (virtTestUseTerminalColors()) if (virTestUseTerminalColors())
fprintf(stderr, "\e[34m\e[1mSKIP\e[0m\n"); /* bold blue */ fprintf(stderr, "\e[34m\e[1mSKIP\e[0m\n"); /* bold blue */
else else
fprintf(stderr, "SKIP\n"); fprintf(stderr, "SKIP\n");
else else
if (virtTestUseTerminalColors()) if (virTestUseTerminalColors())
fprintf(stderr, "\e[31m\e[1mFAILED\e[0m\n"); /* bold red */ fprintf(stderr, "\e[31m\e[1mFAILED\e[0m\n"); /* bold red */
else else
fprintf(stderr, "FAILED\n"); fprintf(stderr, "FAILED\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册