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 --- minui/include/private/resources.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'minui/include/private/resources.h') diff --git a/minui/include/private/resources.h b/minui/include/private/resources.h index 2a83a1028..047ebe2e3 100644 --- a/minui/include/private/resources.h +++ b/minui/include/private/resources.h @@ -82,3 +82,6 @@ class PngHandler { // After initialization, we'll keep the file pointer open before destruction of PngHandler. std::unique_ptr png_fp_{ nullptr, fclose }; }; + +// Overrides the default resource dir, for testing purpose. +void res_set_resource_dir(const std::string&); -- cgit v1.2.3