Camera2 Test: Skip CameraModuleTest for HAL V1 devices
Bug: 10971907 Change-Id: Ia3aa0e370d7eb5de6bb1fb7ff48a71ea5605fa17
This commit is contained in:
parent
b0c303229f
commit
b44ff6508b
1 changed files with 15 additions and 4 deletions
|
@ -64,11 +64,22 @@ TEST_F(CameraModuleTest, LoadModule) {
|
|||
|
||||
TEST_EXTENSION_FORKING_INIT;
|
||||
|
||||
status_t stat;
|
||||
for (int i = 0; i < mNumberOfCameras; ++i) {
|
||||
CreateCamera(i, &mDevice);
|
||||
ASSERT_EQ(OK, initializeDevice(i))
|
||||
<< "Failed to initialize device " << i;
|
||||
mDevice.clear();
|
||||
if (isDeviceVersionHal2(i, &stat) && stat == OK) {
|
||||
CreateCamera(i, &mDevice);
|
||||
ASSERT_EQ(OK, initializeDevice(i))
|
||||
<< "Failed to initialize device " << i;
|
||||
mDevice.clear();
|
||||
} else {
|
||||
const ::testing::TestInfo* const test_info =
|
||||
::testing::UnitTest::GetInstance()->current_test_info();
|
||||
std::cerr << "Skipping test "
|
||||
<< test_info->test_case_name() << "."
|
||||
<< test_info->name()
|
||||
<< " because HAL device version is V1"
|
||||
<< std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue