From 641fa97def3e6ef52471e47ad25d0658ef4d943e Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Wed, 25 Apr 2018 18:59:40 -0700 Subject: Rename CacheLocation to Paths. We have a general need for overriding more paths (e.g. "/tmp"), mostly for testing purpose. Rename CacheLocation to Paths, and use that to manage TEMPORARY_{INSTALL,LOG}_FILE. Test: mmma -j bootable/recovery Test: recovery_component_test Change-Id: Ia8ce8e5695df37ca434f13ac4d3206de1e8e9396 --- tests/component/applypatch_test.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/component/applypatch_test.cpp') diff --git a/tests/component/applypatch_test.cpp b/tests/component/applypatch_test.cpp index 292d76e43..158ea6359 100644 --- a/tests/component/applypatch_test.cpp +++ b/tests/component/applypatch_test.cpp @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -36,12 +35,13 @@ #include #include #include +#include #include #include "applypatch/applypatch.h" #include "applypatch/applypatch_modes.h" #include "common/test_constants.h" -#include "otautil/cache_location.h" +#include "otautil/paths.h" #include "otautil/print_sha1.h" using namespace std::string_literals; @@ -110,14 +110,14 @@ class ApplyPatchCacheTest : public ApplyPatchTest { protected: void SetUp() override { ApplyPatchTest::SetUp(); - CacheLocation::location().set_cache_temp_source(old_file); + Paths::Get().set_cache_temp_source(old_file); } }; class ApplyPatchModesTest : public ::testing::Test { protected: void SetUp() override { - CacheLocation::location().set_cache_temp_source(cache_source.path); + Paths::Get().set_cache_temp_source(cache_source.path); android::base::InitLogging(nullptr, &test_logger); android::base::SetMinimumLogSeverity(android::base::LogSeverity::DEBUG); } @@ -157,7 +157,7 @@ class FreeCacheTest : public ::testing::Test { } void SetUp() override { - CacheLocation::location().set_cache_log_directory(mock_log_dir.path); + Paths::Get().set_cache_log_directory(mock_log_dir.path); } // A mock method to calculate the free space. It assumes the partition has a total size of 40960 -- cgit v1.2.3