change all vts hidl tests to use VtsHalHidlTargetBaseTest (internal master)
Bug: 33385836
Test: mma
Change-Id: Ide3ebc4a9db76257f33bcfb0c1f13d2ee33eeaa8
diff --git a/power/1.0/vts/functional/Android.bp b/power/1.0/vts/functional/Android.bp
index 9d1118e..984f9e3 100644
--- a/power/1.0/vts/functional/Android.bp
+++ b/power/1.0/vts/functional/Android.bp
@@ -16,7 +16,6 @@
cc_test {
name: "VtsHalPowerV1_0TargetTest",
- gtest: true,
srcs: ["VtsHalPowerV1_0TargetTest.cpp"],
shared_libs: [
"libbase",
@@ -28,7 +27,7 @@
"libutils",
"android.hardware.power@1.0",
],
- static_libs: ["libgtest"],
+ static_libs: ["VtsHalHidlTargetBaseTest"],
cflags: [
"-O0",
"-g",
diff --git a/power/1.0/vts/functional/VtsHalPowerV1_0TargetTest.cpp b/power/1.0/vts/functional/VtsHalPowerV1_0TargetTest.cpp
index 7a34f00..757367b 100644
--- a/power/1.0/vts/functional/VtsHalPowerV1_0TargetTest.cpp
+++ b/power/1.0/vts/functional/VtsHalPowerV1_0TargetTest.cpp
@@ -22,7 +22,7 @@
#include <android-base/unique_fd.h>
#include <android/hardware/power/1.0/IPower.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include <algorithm>
@@ -43,10 +43,10 @@
#define AVAILABLE_GOVERNORS_PATH \
"/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors"
-class PowerHidlTest : public ::testing::Test {
+class PowerHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
public:
virtual void SetUp() override {
- power = IPower::getService();
+ power = ::testing::VtsHalHidlTargetBaseTest::getService<IPower>();
ASSERT_NE(power, nullptr);
}