aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTianjie Xu2017-08-29 12:34:28 -0500
committerandroid-build-merger2017-08-29 12:34:28 -0500
commit44d0b008c6b2c0a9f4ededcb58aa4d27f8adec91 (patch)
treee2b79f11b73bdb1b593076a25025b6c355a64559 /tests
parentd21fb1ece08cd2629b9cb3a508cb4b1e3620aa4e (diff)
parent11f68b6b691425eb001a073ff56d8b448a564d8a (diff)
downloadplatform-bootable-recovery-44d0b008c6b2c0a9f4ededcb58aa4d27f8adec91.tar.gz
platform-bootable-recovery-44d0b008c6b2c0a9f4ededcb58aa4d27f8adec91.tar.xz
platform-bootable-recovery-44d0b008c6b2c0a9f4ededcb58aa4d27f8adec91.zip
Merge "Turn on -Wall for recovery modules"
am: 11f68b6b69 Change-Id: I5f0531de7880682c7dfe75a6274f41519e0c64d6
Diffstat (limited to 'tests')
-rw-r--r--tests/Android.mk7
-rw-r--r--tests/component/applypatch_test.cpp8
2 files changed, 4 insertions, 11 deletions
diff --git a/tests/Android.mk b/tests/Android.mk
index f2497b8b..748d9c87 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -18,7 +18,7 @@ LOCAL_PATH := $(call my-dir)
18 18
19# Unit tests 19# Unit tests
20include $(CLEAR_VARS) 20include $(CLEAR_VARS)
21LOCAL_CFLAGS := -Werror 21LOCAL_CFLAGS := -Wall -Werror
22LOCAL_MODULE := recovery_unit_test 22LOCAL_MODULE := recovery_unit_test
23LOCAL_COMPATIBILITY_SUITE := device-tests 23LOCAL_COMPATIBILITY_SUITE := device-tests
24LOCAL_STATIC_LIBRARIES := \ 24LOCAL_STATIC_LIBRARIES := \
@@ -46,7 +46,7 @@ include $(BUILD_NATIVE_TEST)
46 46
47# Manual tests 47# Manual tests
48include $(CLEAR_VARS) 48include $(CLEAR_VARS)
49LOCAL_CFLAGS := -Werror 49LOCAL_CFLAGS := -Wall -Werror
50LOCAL_MODULE := recovery_manual_test 50LOCAL_MODULE := recovery_manual_test
51LOCAL_STATIC_LIBRARIES := \ 51LOCAL_STATIC_LIBRARIES := \
52 libminui \ 52 libminui \
@@ -81,6 +81,7 @@ include $(BUILD_NATIVE_TEST)
81# Component tests 81# Component tests
82include $(CLEAR_VARS) 82include $(CLEAR_VARS)
83LOCAL_CFLAGS := \ 83LOCAL_CFLAGS := \
84 -Wall \
84 -Werror \ 85 -Werror \
85 -D_FILE_OFFSET_BITS=64 86 -D_FILE_OFFSET_BITS=64
86 87
@@ -191,7 +192,7 @@ include $(BUILD_NATIVE_TEST)
191 192
192# Host tests 193# Host tests
193include $(CLEAR_VARS) 194include $(CLEAR_VARS)
194LOCAL_CFLAGS := -Werror 195LOCAL_CFLAGS := -Wall -Werror
195LOCAL_MODULE := recovery_host_test 196LOCAL_MODULE := recovery_host_test
196LOCAL_MODULE_HOST_OS := linux 197LOCAL_MODULE_HOST_OS := linux
197LOCAL_C_INCLUDES := bootable/recovery 198LOCAL_C_INCLUDES := bootable/recovery
diff --git a/tests/component/applypatch_test.cpp b/tests/component/applypatch_test.cpp
index 016fed9b..42542898 100644
--- a/tests/component/applypatch_test.cpp
+++ b/tests/component/applypatch_test.cpp
@@ -61,14 +61,6 @@ static void mangle_file(const std::string& fname) {
61 ASSERT_TRUE(android::base::WriteStringToFile(content, fname)); 61 ASSERT_TRUE(android::base::WriteStringToFile(content, fname));
62} 62}
63 63
64static bool file_cmp(const std::string& f1, const std::string& f2) {
65 std::string c1;
66 android::base::ReadFileToString(f1, &c1);
67 std::string c2;
68 android::base::ReadFileToString(f2, &c2);
69 return c1 == c2;
70}
71
72class ApplyPatchTest : public ::testing::Test { 64class ApplyPatchTest : public ::testing::Test {
73 public: 65 public:
74 static void SetUpTestCase() { 66 static void SetUpTestCase() {