From 6cd816859e462e8741ced8dc24c00b7cd8304e2a Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Thu, 3 May 2018 21:53:11 -0700 Subject: tests: Add tests for ScreenRecoveryUI. In order to support that, this CL adds Paths::set_resource_dir() to override the default resource dir ("/res/images/") that's only available under recovery. Note that since there're external modules depending on libminui, it adds a separate function of res_set_resource_dir(), instead of requiring the dependency on libotautil for everyone. Test: mmma -j bootable/recovery Test: Run recovery_unit_test on marlin. Change-Id: I0a7dcf4476808bea9e634eaffc9676f6cbaf92b7 --- otautil/paths.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'otautil/paths.cpp') diff --git a/otautil/paths.cpp b/otautil/paths.cpp index ad9ec1145..f08e51c7a 100644 --- a/otautil/paths.cpp +++ b/otautil/paths.cpp @@ -19,6 +19,7 @@ constexpr const char kDefaultCacheLogDirectory[] = "/cache/recovery"; constexpr const char kDefaultCacheTempSource[] = "/cache/saved.file"; constexpr const char kDefaultLastCommandFile[] = "/cache/recovery/last_command"; +constexpr const char kDefaultResourceDirectory[] = "/res/images"; constexpr const char kDefaultStashDirectoryBase[] = "/cache/recovery"; constexpr const char kDefaultTemporaryInstallFile[] = "/tmp/last_install"; constexpr const char kDefaultTemporaryLogFile[] = "/tmp/recovery.log"; @@ -32,6 +33,7 @@ Paths::Paths() : cache_log_directory_(kDefaultCacheLogDirectory), cache_temp_source_(kDefaultCacheTempSource), last_command_file_(kDefaultLastCommandFile), + resource_dir_(kDefaultResourceDirectory), stash_directory_base_(kDefaultStashDirectoryBase), temporary_install_file_(kDefaultTemporaryInstallFile), temporary_log_file_(kDefaultTemporaryLogFile) {} -- cgit v1.2.3