aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTao Bao2017-09-29 16:39:33 -0500
committerTao Bao2017-10-10 17:52:11 -0500
commit09e468f84cc245fba61d69165b4af8f1ec4cdfd5 (patch)
tree415073930d2bb71cae132e38a57cea3f2c15d7e1 /tests
parenteb8a064066aa4a8662896a0d37b84e9f8b3de0a6 (diff)
downloadplatform-bootable-recovery-09e468f84cc245fba61d69165b4af8f1ec4cdfd5.tar.gz
platform-bootable-recovery-09e468f84cc245fba61d69165b4af8f1ec4cdfd5.tar.xz
platform-bootable-recovery-09e468f84cc245fba61d69165b4af8f1ec4cdfd5.zip
Move rangeset.h and print_sha1.h into otautil.
Also drop the "bootable/recovery" path in LOCAL_C_INCLUDES from applypatch modules. Test: lunch aosp_{angler,bullhead,fugu,dragon,sailfish}-userdebug; mmma bootable/recovery Change-Id: Idd602a796894f971ee4f8fa3eafe36c42d9de986
Diffstat (limited to 'tests')
-rw-r--r--tests/Android.mk1
-rw-r--r--tests/component/applypatch_test.cpp2
-rw-r--r--tests/component/updater_test.cpp2
-rw-r--r--tests/unit/rangeset_test.cpp4
4 files changed, 5 insertions, 4 deletions
diff --git a/tests/Android.mk b/tests/Android.mk
index 31c7de17..b0f71a83 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -201,6 +201,7 @@ LOCAL_SRC_FILES := \
201LOCAL_STATIC_LIBRARIES := \ 201LOCAL_STATIC_LIBRARIES := \
202 libimgdiff \ 202 libimgdiff \
203 libimgpatch \ 203 libimgpatch \
204 libotautil \
204 libbsdiff \ 205 libbsdiff \
205 libbspatch \ 206 libbspatch \
206 libziparchive \ 207 libziparchive \
diff --git a/tests/component/applypatch_test.cpp b/tests/component/applypatch_test.cpp
index 42542898..15ec08fe 100644
--- a/tests/component/applypatch_test.cpp
+++ b/tests/component/applypatch_test.cpp
@@ -35,7 +35,7 @@
35#include "applypatch/applypatch.h" 35#include "applypatch/applypatch.h"
36#include "applypatch/applypatch_modes.h" 36#include "applypatch/applypatch_modes.h"
37#include "common/test_constants.h" 37#include "common/test_constants.h"
38#include "print_sha1.h" 38#include "otautil/print_sha1.h"
39 39
40static void sha1sum(const std::string& fname, std::string* sha1, size_t* fsize = nullptr) { 40static void sha1sum(const std::string& fname, std::string* sha1, size_t* fsize = nullptr) {
41 ASSERT_NE(nullptr, sha1); 41 ASSERT_NE(nullptr, sha1);
diff --git a/tests/component/updater_test.cpp b/tests/component/updater_test.cpp
index e35870dc..e6aec4ad 100644
--- a/tests/component/updater_test.cpp
+++ b/tests/component/updater_test.cpp
@@ -41,7 +41,7 @@
41#include "edify/expr.h" 41#include "edify/expr.h"
42#include "otautil/SysUtil.h" 42#include "otautil/SysUtil.h"
43#include "otautil/error_code.h" 43#include "otautil/error_code.h"
44#include "print_sha1.h" 44#include "otautil/print_sha1.h"
45#include "updater/blockimg.h" 45#include "updater/blockimg.h"
46#include "updater/install.h" 46#include "updater/install.h"
47#include "updater/updater.h" 47#include "updater/updater.h"
diff --git a/tests/unit/rangeset_test.cpp b/tests/unit/rangeset_test.cpp
index 15bcec85..b3ed9921 100644
--- a/tests/unit/rangeset_test.cpp
+++ b/tests/unit/rangeset_test.cpp
@@ -21,7 +21,7 @@
21 21
22#include <gtest/gtest.h> 22#include <gtest/gtest.h>
23 23
24#include "rangeset.h" 24#include "otautil/rangeset.h"
25 25
26TEST(RangeSetTest, Parse_smoke) { 26TEST(RangeSetTest, Parse_smoke) {
27 RangeSet rs = RangeSet::Parse("2,1,10"); 27 RangeSet rs = RangeSet::Parse("2,1,10");
@@ -156,4 +156,4 @@ TEST(SortedRangeSetTest, file_range) {
156 ASSERT_EQ(static_cast<size_t>(40970), rs.GetOffsetInRangeSet(4096 * 16 + 10)); 156 ASSERT_EQ(static_cast<size_t>(40970), rs.GetOffsetInRangeSet(4096 * 16 + 10));
157 // block#10 not in range. 157 // block#10 not in range.
158 ASSERT_EXIT(rs.GetOffsetInRangeSet(40970), ::testing::KilledBySignal(SIGABRT), ""); 158 ASSERT_EXIT(rs.GetOffsetInRangeSet(40970), ::testing::KilledBySignal(SIGABRT), "");
159} \ No newline at end of file 159}