OSDN Git Service

Force non-color output for bionic FileCheck tests
authorColin Cross <ccross@android.com>
Fri, 25 Sep 2015 21:42:07 +0000 (14:42 -0700)
committerColin Cross <ccross@android.com>
Fri, 25 Sep 2015 21:42:07 +0000 (14:42 -0700)
Turning on color output will break the bionic compilation tests that
check for expected warnings, as they will be matching color output
against non-color expected values.  Turn off color locally.

Bug: 24273983
Change-Id: Ia3b3262ccece121217f0dc0997734b3ad65b928b

tests/Android.mk

index 6e61c7e..d582425 100644 (file)
@@ -420,6 +420,8 @@ LOCAL_CXX = $(LOCAL_PATH)/file-check-cxx \
 LOCAL_CLANG := false
 LOCAL_MODULE := bionic-compile-time-tests-g++
 LOCAL_CPPFLAGS := -Wall
+# Disable color diagnostics so the warnings output matches the source
+LOCAL_CPPFLAGS +=  -fdiagnostics-color=never
 LOCAL_SRC_FILES := fortify_compilation_test.cpp
 include $(BUILD_STATIC_LIBRARY)
 
@@ -437,6 +439,8 @@ LOCAL_CXX := $(LOCAL_PATH)/file-check-cxx \
 LOCAL_CLANG := true
 LOCAL_MODULE := bionic-compile-time-tests-clang++
 LOCAL_CPPFLAGS := -Wall
+# Disable color diagnostics so the warnings output matches the source
+LOCAL_CPPFLAGS += -fno-color-diagnostics
 # FileCheck will error if there aren't any CLANG: lines in the file, but there
 # don't appear to be any cases where clang _does_ emit warnings for sn?printf :(
 LOCAL_SRC_FILES :=