Index: src/platform/vboot_reference/tests/firmware_image_tests.c |
diff --git a/src/platform/vboot_reference/tests/firmware_image_tests.c b/src/platform/vboot_reference/tests/firmware_image_tests.c |
index 11eb4760bbe69db344693cdd414ccaa840c36a36..ff7b509cd56b32d5fbe77f21a82a8af8a568c25e 100644 |
--- a/src/platform/vboot_reference/tests/firmware_image_tests.c |
+++ b/src/platform/vboot_reference/tests/firmware_image_tests.c |
@@ -14,13 +14,18 @@ |
#include "sha_utility.h" |
#include "utility.h" |
+/* ANSI Color coding sequences. */ |
+#define COL_GREEN "\e[1;32m" |
+#define COL_RED "\e[0;31m]" |
+#define COL_STOP "\e[m" |
+ |
int TEST_EQ(int result, int expected_result, char* testname) { |
if (result == expected_result) { |
- fprintf(stderr, "%s Test \e[1;32mSUCCEEDED\e[m\n", testname); |
+ fprintf(stderr, "%s Test " COL_GREEN " PASSED\n" COL_STOP, testname); |
return 1; |
} |
else { |
- fprintf(stderr, "%s Test \e[0;31mFAILED\e[m\n", testname); |
+ fprintf(stderr, "%s Test " COL_RED " FAILED\n" COL_STOP, testname); |
return 0; |
} |
} |