Run VtsHalRemotelyProvisionedComponentTargetTest only on V+ devices

Bug: 340188780
Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: Id20a01b23324eb46620d96bd29c30b8cf9acd162
This commit is contained in:
Alice Wang
2024-05-14 07:07:05 +00:00
parent 0ff8e76b77
commit 46ff286f6d

View File

@@ -188,9 +188,15 @@ class VtsRemotelyProvisionedComponentTests : public testing::TestWithParam<std::
}
ASSERT_NE(provisionable_, nullptr);
auto status = provisionable_->getHardwareInfo(&rpcHardwareInfo);
if (GetParam() == RKP_VM_INSTANCE_NAME &&
status.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
GTEST_SKIP() << "The RKP VM is not supported on this system.";
if (GetParam() == RKP_VM_INSTANCE_NAME) {
if (status.getExceptionCode() == EX_UNSUPPORTED_OPERATION) {
GTEST_SKIP() << "The RKP VM is not supported on this system.";
}
int apiLevel = get_vsr_api_level();
if (apiLevel < __ANDROID_API_V__) {
GTEST_SKIP() << "The RKP VM is supported only on V+ devices. Vendor API level: "
<< apiLevel;
}
}
ASSERT_TRUE(status.isOk());
}