Set time delay in the vts test setup

Bug: 69398018
Test: run vts
Change-Id: Ibe1e8f1b08342f1b0b867bfa7bcf1b2fe4a85622
This commit is contained in:
sqian
2017-11-20 15:15:27 -08:00
parent 5b7092f31c
commit fe32af21bd
3 changed files with 15 additions and 0 deletions

View File

@@ -19,6 +19,11 @@
void RadioHidlTest::SetUp() {
radio =
::testing::VtsHalHidlTargetTestBase::getService<IRadio>(hidl_string(RADIO_SERVICE_NAME));
if (radio == NULL) {
sleep(60);
radio = ::testing::VtsHalHidlTargetTestBase::getService<IRadio>(
hidl_string(RADIO_SERVICE_NAME));
}
ASSERT_NE(nullptr, radio.get());
radioRsp = new (std::nothrow) RadioResponse(*this);

View File

@@ -20,6 +20,11 @@ void RadioHidlTest_v1_1::SetUp() {
radio_v1_1 =
::testing::VtsHalHidlTargetTestBase::getService<::android::hardware::radio::V1_1::IRadio>(
hidl_string(RADIO_SERVICE_NAME));
if (radio_v1_1 == NULL) {
sleep(60);
radio_v1_1 = ::testing::VtsHalHidlTargetTestBase::getService<
::android::hardware::radio::V1_1::IRadio>(hidl_string(RADIO_SERVICE_NAME));
}
ASSERT_NE(nullptr, radio_v1_1.get());
radioRsp_v1_1 = new (std::nothrow) RadioResponse_v1_1(*this);

View File

@@ -19,6 +19,11 @@
void RadioHidlTest_v1_2::SetUp() {
radio_v1_2 = ::testing::VtsHalHidlTargetTestBase::getService<V1_2::IRadio>(
hidl_string(RADIO_SERVICE_NAME));
if (radio_v1_2 == NULL) {
sleep(60);
radio_v1_2 = ::testing::VtsHalHidlTargetTestBase::getService<V1_2::IRadio>(
hidl_string(RADIO_SERVICE_NAME));
}
ASSERT_NE(nullptr, radio_v1_2.get());
radioRsp_v1_2 = new (std::nothrow) RadioResponse_v1_2(*this);