audio: use vts target test base class
Test: make vts succeed Change-Id: I8008392e016e0604f8aa9a292f1ec6c6e7c3b384
This commit is contained in:
parent
ed2bb4e8f8
commit
161b564b35
2 changed files with 4 additions and 5 deletions
|
@ -17,7 +17,6 @@
|
|||
cc_test {
|
||||
name: "VtsHalAudioV2_0TargetTest",
|
||||
defaults: ["hidl_defaults"],
|
||||
gtest: true,
|
||||
srcs: ["AudioPrimaryHidlHalTest.cpp"],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
|
@ -28,7 +27,7 @@ cc_test {
|
|||
"android.hardware.audio@2.0",
|
||||
"android.hardware.audio.common@2.0",
|
||||
],
|
||||
static_libs: ["libgtest"],
|
||||
static_libs: ["VtsHalHidlTargetTestBase"],
|
||||
cflags: [
|
||||
"-O0",
|
||||
"-g",
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <VtsHalHidlTargetTestBase.h>
|
||||
|
||||
#include <android-base/logging.h>
|
||||
|
||||
|
@ -113,7 +113,7 @@ private:
|
|||
// Instance to register global tearDown
|
||||
static Environment* environment;
|
||||
|
||||
class HidlTest : public ::testing::Test {
|
||||
class HidlTest : public ::testing::VtsHalHidlTargetTestBase {
|
||||
protected:
|
||||
// Convenient member to store results
|
||||
Result res;
|
||||
|
@ -131,7 +131,7 @@ public:
|
|||
|
||||
if (devicesFactory == nullptr) {
|
||||
environment->registerTearDown([]{ devicesFactory.clear(); });
|
||||
devicesFactory = IDevicesFactory::getService();
|
||||
devicesFactory = ::testing::VtsHalHidlTargetTestBase::getService<IDevicesFactory>();
|
||||
}
|
||||
ASSERT_TRUE(devicesFactory != nullptr);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue