diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Android.mk | 7 | ||||
-rw-r--r-- | tests/component/applypatch_test.cpp | 8 |
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 |
20 | include $(CLEAR_VARS) | 20 | include $(CLEAR_VARS) |
21 | LOCAL_CFLAGS := -Werror | 21 | LOCAL_CFLAGS := -Wall -Werror |
22 | LOCAL_MODULE := recovery_unit_test | 22 | LOCAL_MODULE := recovery_unit_test |
23 | LOCAL_COMPATIBILITY_SUITE := device-tests | 23 | LOCAL_COMPATIBILITY_SUITE := device-tests |
24 | LOCAL_STATIC_LIBRARIES := \ | 24 | LOCAL_STATIC_LIBRARIES := \ |
@@ -46,7 +46,7 @@ include $(BUILD_NATIVE_TEST) | |||
46 | 46 | ||
47 | # Manual tests | 47 | # Manual tests |
48 | include $(CLEAR_VARS) | 48 | include $(CLEAR_VARS) |
49 | LOCAL_CFLAGS := -Werror | 49 | LOCAL_CFLAGS := -Wall -Werror |
50 | LOCAL_MODULE := recovery_manual_test | 50 | LOCAL_MODULE := recovery_manual_test |
51 | LOCAL_STATIC_LIBRARIES := \ | 51 | LOCAL_STATIC_LIBRARIES := \ |
52 | libminui \ | 52 | libminui \ |
@@ -81,6 +81,7 @@ include $(BUILD_NATIVE_TEST) | |||
81 | # Component tests | 81 | # Component tests |
82 | include $(CLEAR_VARS) | 82 | include $(CLEAR_VARS) |
83 | LOCAL_CFLAGS := \ | 83 | LOCAL_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 |
193 | include $(CLEAR_VARS) | 194 | include $(CLEAR_VARS) |
194 | LOCAL_CFLAGS := -Werror | 195 | LOCAL_CFLAGS := -Wall -Werror |
195 | LOCAL_MODULE := recovery_host_test | 196 | LOCAL_MODULE := recovery_host_test |
196 | LOCAL_MODULE_HOST_OS := linux | 197 | LOCAL_MODULE_HOST_OS := linux |
197 | LOCAL_C_INCLUDES := bootable/recovery | 198 | LOCAL_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 | ||
64 | static 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 | |||
72 | class ApplyPatchTest : public ::testing::Test { | 64 | class ApplyPatchTest : public ::testing::Test { |
73 | public: | 65 | public: |
74 | static void SetUpTestCase() { | 66 | static void SetUpTestCase() { |