Use -Werror in bionic/tests

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I64a0458c787054a0694c736be20dc53772ff3781
diff --git a/tests/Android.mk b/tests/Android.mk
index 98216d7..c945bab 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -75,7 +75,7 @@
 
 LOCAL_CLANG := false
 LOCAL_MODULE := bionic-compile-time-tests-g++
-LOCAL_CPPFLAGS := -Wall
+LOCAL_CPPFLAGS := -Wall -Werror
 # Disable color diagnostics so the warnings output matches the source
 LOCAL_CPPFLAGS += -fdiagnostics-color=never
 LOCAL_SRC_FILES := fortify_filecheck_diagnostics_test.cpp
@@ -94,7 +94,7 @@
 
 LOCAL_CLANG := true
 LOCAL_MODULE := bionic-compile-time-tests-clang++
-LOCAL_CPPFLAGS := -Wall
+LOCAL_CPPFLAGS := -Wall -Werror
 LOCAL_CPPFLAGS += -fno-color-diagnostics -ferror-limit=10000
 LOCAL_SRC_FILES := fortify_filecheck_diagnostics_test.cpp
 include $(BUILD_STATIC_LIBRARY)