change all vts hidl tests to use VtsHalHidlTargetBaseTest (internal master)
Bug: 33385836
Test: mma
Change-Id: Ide3ebc4a9db76257f33bcfb0c1f13d2ee33eeaa8
diff --git a/sensors/1.0/vts/functional/Android.bp b/sensors/1.0/vts/functional/Android.bp
index c2889c5..4be4f64 100644
--- a/sensors/1.0/vts/functional/Android.bp
+++ b/sensors/1.0/vts/functional/Android.bp
@@ -16,7 +16,6 @@
cc_test {
name: "VtsHalSensorsV1_0TargetTest",
- gtest: true,
srcs: ["VtsHalSensorsV1_0TargetTest.cpp"],
shared_libs: [
"android.hardware.sensors@1.0",
@@ -25,7 +24,7 @@
"liblog",
"libutils",
],
- static_libs: ["libgtest"],
+ static_libs: ["VtsHalHidlTargetBaseTest"],
cflags: [
"-O0",
"-g",
diff --git a/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
index 9a71745..b1483e3 100644
--- a/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
+++ b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
@@ -20,7 +20,7 @@
#include <android/hardware/sensors/1.0/types.h>
#include <android/log.h>
#include <cutils/ashmem.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include <hardware/sensors.h> // for sensor type strings
#include <algorithm>
@@ -80,7 +80,7 @@
};
void SensorsHidlEnvironment::SetUp() {
- sensors = ISensors::getService();
+ sensors = ::testing::VtsHalHidlTargetBaseTest::getService<ISensors>();
ALOGI_IF(sensors, "sensors is not nullptr, %p", sensors.get());
ASSERT_NE(sensors, nullptr);
@@ -309,7 +309,7 @@
}
// The main test class for SENSORS HIDL HAL.
-class SensorsHidlTest : public ::testing::Test {
+class SensorsHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
public:
virtual void SetUp() override {
}