diff options
Diffstat (limited to 'renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp')
-rw-r--r-- | renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp b/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp index c6eecd6afd..0636cf9515 100644 --- a/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp +++ b/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp @@ -18,7 +18,8 @@ // The main test class for RENDERSCRIPT HIDL HAL. void RenderscriptHidlTest::SetUp() { - device = ::testing::VtsHalHidlTargetTestBase::getService<IDevice>(); + device = ::testing::VtsHalHidlTargetTestBase::getService<IDevice>( + RenderscriptHidlEnvironment::Instance()->getServiceName<IDevice>()); ASSERT_NE(nullptr, device.get()); uint32_t version = 0; @@ -34,17 +35,10 @@ void RenderscriptHidlTest::TearDown() { } } -// A class for test environment setup (kept since this file is a template). -class RenderscriptHidlEnvironment : public ::testing::Environment { -public: - virtual void SetUp() {} - virtual void TearDown() {} -}; - - int main(int argc, char** argv) { - ::testing::AddGlobalTestEnvironment(new RenderscriptHidlEnvironment); + ::testing::AddGlobalTestEnvironment(RenderscriptHidlEnvironment::Instance()); ::testing::InitGoogleTest(&argc, argv); + RenderscriptHidlEnvironment::Instance()->init(&argc, argv); int status = RUN_ALL_TESTS(); LOG(INFO) << "Test result = " << status; return status; |