GPU name normalization on Android
diff --git a/test/mock/huawei-ascend-p7.cc b/test/mock/huawei-ascend-p7.cc
index 5413f94..3f43336 100644
--- a/test/mock/huawei-ascend-p7.cc
+++ b/test/mock/huawei-ascend-p7.cc
@@ -128,6 +128,14 @@
}
}
+TEST(PACKAGES, gpu_name) {
+ for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
+ ASSERT_EQ("ARM Mali-450",
+ std::string(cpuinfo_get_package(i)->gpu_name,
+ strnlen(cpuinfo_get_package(i)->gpu_name, CPUINFO_GPU_NAME_MAX)));
+ }
+}
+
TEST(PACKAGES, processor_start) {
for (uint32_t i = 0; i < cpuinfo_get_packages_count(); i++) {
ASSERT_EQ(0, cpuinfo_get_package(i)->processor_start);
@@ -447,6 +455,7 @@
cpuinfo_mock_filesystem(filesystem);
#ifdef __ANDROID__
cpuinfo_mock_android_properties(properties);
+ cpuinfo_mock_gl_renderer("Mali-450 MP");
#endif
cpuinfo_initialize();
::testing::InitGoogleTest(&argc, argv);