Merge changes from topic "am-37170c8f22554766afc25915c7a99d41" into tm-qpr-dev-plus-aosp am: 12c59c3f5a

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2381552

Change-Id: Idb3222dfb922a26ffbee2ee23d4428aa27a5b818
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Automerger Merge Worker
2023-01-10 19:18:40 +00:00

View File

@@ -15,6 +15,7 @@
*/
#include <android-base/macros.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <stdio.h>
#include <stdlib.h>
@@ -49,8 +50,14 @@ std::string findRootPath() {
// No code left untested
TEST(GraphicsStats, findRootPath) {
std::string expected = "/data/local/tmp/nativetest/hwui_unit_tests/" ABI_STRING;
EXPECT_EQ(expected, findRootPath());
// Different tools/infrastructure seem to push this to different locations. It shouldn't really
// matter where the binary is, so add new locations here as needed. This test still seems good
// as it's nice to understand the possibility space, and ensure findRootPath continues working
// as expected.
std::string acceptableLocations[] = {"/data/nativetest/hwui_unit_tests",
"/data/nativetest64/hwui_unit_tests",
"/data/local/tmp/nativetest/hwui_unit_tests/" ABI_STRING};
EXPECT_THAT(acceptableLocations, ::testing::Contains(findRootPath()));
}
TEST(GraphicsStats, saveLoad) {