Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d2ccc04 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fixed gpuservice_unittest mem leaks" am: 34f8fc85 am: 93baab7e am: 980c7d19

parents 3528f0ec 980c7d19
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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>

@@ -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());
@@ -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);