Loading services/gpuservice/tests/unittests/GpuStatsTest.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ #include <gtest/gtest.h> #include <stats_pull_atom_callback.h> #include <statslog.h> #include <utils/Looper.h> #include <utils/String16.h> #include <utils/Vector.h> Loading Loading @@ -62,8 +63,9 @@ enum InputCommand : int32_t { // clang-format on class GpuStatsTest : public testing::Test { sp<android::Looper> looper; public: GpuStatsTest() { GpuStatsTest() : looper(Looper::prepare(0 /* opts */)) { const ::testing::TestInfo* const test_info = ::testing::UnitTest::GetInstance()->current_test_info(); ALOGD("**** Setting up for %s.%s\n", test_info->test_case_name(), test_info->name()); Loading @@ -73,6 +75,10 @@ public: const ::testing::TestInfo* const test_info = ::testing::UnitTest::GetInstance()->current_test_info(); ALOGD("**** Tearing down after %s.%s\n", test_info->test_case_name(), test_info->name()); // performs all pending callbacks until all data has been consumed // gives time to process binder transactions by thread pool looper->pollAll(1000); } std::string inputCommand(InputCommand cmd); Loading Loading
services/gpuservice/tests/unittests/GpuStatsTest.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ #include <gtest/gtest.h> #include <stats_pull_atom_callback.h> #include <statslog.h> #include <utils/Looper.h> #include <utils/String16.h> #include <utils/Vector.h> Loading Loading @@ -62,8 +63,9 @@ enum InputCommand : int32_t { // clang-format on class GpuStatsTest : public testing::Test { sp<android::Looper> looper; public: GpuStatsTest() { GpuStatsTest() : looper(Looper::prepare(0 /* opts */)) { const ::testing::TestInfo* const test_info = ::testing::UnitTest::GetInstance()->current_test_info(); ALOGD("**** Setting up for %s.%s\n", test_info->test_case_name(), test_info->name()); Loading @@ -73,6 +75,10 @@ public: const ::testing::TestInfo* const test_info = ::testing::UnitTest::GetInstance()->current_test_info(); ALOGD("**** Tearing down after %s.%s\n", test_info->test_case_name(), test_info->name()); // performs all pending callbacks until all data has been consumed // gives time to process binder transactions by thread pool looper->pollAll(1000); } std::string inputCommand(InputCommand cmd); Loading