Explicitly close the EVS display
A test case closes the EVS display explicitly to make sure an associated
EGL surface is destoryed before running a next test case.
Fix: 266098494
Test: atest VtsHalEvsTargetTest
Change-Id: I4079242884ed436bca95c983b3e4475f2cef1464
diff --git a/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp b/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp
index 3cab204..2706c49 100644
--- a/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp
+++ b/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp
@@ -619,6 +619,7 @@
getPhysicalCameraIds(cam.id, isLogicalCam);
if (mIsHwModule && isLogicalCam) {
LOG(INFO) << "Skip a logical device " << cam.id << " for HW target.";
+ ASSERT_TRUE(mEnumerator->closeDisplay(pDisplay).isOk());
continue;
}
@@ -1437,7 +1438,8 @@
ASSERT_TRUE(pCam1->getParameterList(&cam1Cmds).isOk());
if (cam0Cmds.size() < 1 || cam1Cmds.size() < 1) {
// Cannot execute this test.
- return;
+ ASSERT_TRUE(mEnumerator->closeDisplay(pDisplay).isOk());
+ continue;
}
// Set up a frame receiver object which will fire up its own thread.