aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
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() {