mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Fix Power VTS test setup code
Bug: 33757678 Test: make vts; vts-tradefed run vts -m HalPowerHidlTargetTest Change-Id: Ia6d5073d7df858a5799270f364f989d7fc26690b Signed-off-by: Connor O'Brien <connoro@google.com>
This commit is contained in:
@@ -35,18 +35,8 @@ using ::android::sp;
|
||||
class PowerHidlTest : public ::testing::Test {
|
||||
public:
|
||||
virtual void SetUp() override {
|
||||
// TODO(b/33385836) Delete copied code
|
||||
bool getStub = false;
|
||||
char getSubProperty[PROPERTY_VALUE_MAX];
|
||||
if (property_get("vts.hidl.get_stub", getSubProperty, "") > 0) {
|
||||
if (!strcmp(getSubProperty, "true") || !strcmp(getSubProperty, "True") ||
|
||||
!strcmp(getSubProperty, "1")) {
|
||||
getStub = true;
|
||||
}
|
||||
}
|
||||
power = IPower::getService("power", getStub);
|
||||
power = IPower::getService("power");
|
||||
ASSERT_NE(power, nullptr);
|
||||
ASSERT_EQ(!getStub, power->isRemote());
|
||||
}
|
||||
|
||||
virtual void TearDown() override {}
|
||||
|
||||
Reference in New Issue
Block a user