From 81787fbf207fb18edb126522b6d76bb143e4bff9 Mon Sep 17 00:00:00 2001 From: Nolan Scobie Date: Mon, 14 Nov 2022 19:35:58 -0500 Subject: [PATCH 1/2] Fix GraphicsStats#findRootPath and disable CacheManager#trimMemory tests ...in hwui_unit_tests Test: atest hwui_unit_tests Bug: 257123741 Bug: 258700630 Change-Id: Ibadb457d0c8f45ceca8153320ae5b896ae55bba2 --- libs/hwui/tests/unit/CacheManagerTests.cpp | 3 ++- libs/hwui/tests/unit/GraphicsStatsServiceTests.cpp | 14 +++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/libs/hwui/tests/unit/CacheManagerTests.cpp b/libs/hwui/tests/unit/CacheManagerTests.cpp index df06ead3aa0cf..508e1986b4e44 100644 --- a/libs/hwui/tests/unit/CacheManagerTests.cpp +++ b/libs/hwui/tests/unit/CacheManagerTests.cpp @@ -32,7 +32,8 @@ static size_t getCacheUsage(GrDirectContext* grContext) { return cacheUsage; } -RENDERTHREAD_SKIA_PIPELINE_TEST(CacheManager, trimMemory) { +// TOOD(258700630): fix this test and re-enable +RENDERTHREAD_SKIA_PIPELINE_TEST(CacheManager, DISABLED_trimMemory) { int32_t width = DeviceInfo::get()->getWidth(); int32_t height = DeviceInfo::get()->getHeight(); GrDirectContext* grContext = renderThread.getGrContext(); diff --git a/libs/hwui/tests/unit/GraphicsStatsServiceTests.cpp b/libs/hwui/tests/unit/GraphicsStatsServiceTests.cpp index 098b4ccea8cff..92fd8294a486a 100644 --- a/libs/hwui/tests/unit/GraphicsStatsServiceTests.cpp +++ b/libs/hwui/tests/unit/GraphicsStatsServiceTests.cpp @@ -14,17 +14,17 @@ * limitations under the License. */ +#include #include - -#include "protos/graphicsstats.pb.h" -#include "service/GraphicsStatsService.h" - #include #include #include #include #include +#include "protos/graphicsstats.pb.h" +#include "service/GraphicsStatsService.h" + using namespace android; using namespace android::uirenderer; @@ -49,11 +49,7 @@ std::string findRootPath() { // No code left untested TEST(GraphicsStats, findRootPath) { -#ifdef __LP64__ - std::string expected = "/data/nativetest64/hwui_unit_tests"; -#else - std::string expected = "/data/nativetest/hwui_unit_tests"; -#endif + std::string expected = "/data/local/tmp/nativetest/hwui_unit_tests/" ABI_STRING; EXPECT_EQ(expected, findRootPath()); } From 4c8c4ab555b5b767061fcba155e07d9cfcf4ba24 Mon Sep 17 00:00:00 2001 From: Nolan Scobie Date: Thu, 10 Nov 2022 15:36:08 -0500 Subject: [PATCH 2/2] Enable hwui_unit_tests in presubmit for libs/hwui Test: presubmits Bug: 257123741 Change-Id: I4a5f754875936b757c6d239f9d1a087386a4087e --- libs/hwui/TEST_MAPPING | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/hwui/TEST_MAPPING b/libs/hwui/TEST_MAPPING index b1719a979ce58..03682e82e28d4 100644 --- a/libs/hwui/TEST_MAPPING +++ b/libs/hwui/TEST_MAPPING @@ -5,6 +5,9 @@ }, { "name": "CtsAccelerationTestCases" + }, + { + "name": "hwui_unit_tests" } ], "imports": [