Camera2: Tests: Release streams after HAL is unloaded
This fixes a segfault in the HAL where it was trying to write to a locked buffer
that disappeared from underneath it.
Any users of CameraModuleFixture should now call SetUp/TearDown explicitly.
Other classes remain unchanged until we need a custom TearDown order for them.
Change-Id: I9aa8c2d86492a76f2c01c1ad4cbe0cf91e5c7916
diff --git a/tests/camera2/CameraModuleFixture.h b/tests/camera2/CameraModuleFixture.h
index 6ad1ae8..cd8ddc4 100644
--- a/tests/camera2/CameraModuleFixture.h
+++ b/tests/camera2/CameraModuleFixture.h
@@ -37,14 +37,10 @@
TEST_EXTENSION_FORKING_CONSTRUCTOR;
mCameraID = CameraID;
-
- SetUp();
}
~CameraModuleFixture() {
TEST_EXTENSION_FORKING_DESTRUCTOR;
-
- TearDown();
}
camera_metadata_ro_entry GetStaticEntry(uint32_t tag) const {
@@ -53,8 +49,6 @@
return entry;
}
-private:
-
void SetUp() {
TEST_EXTENSION_FORKING_SET_UP;
@@ -88,6 +82,8 @@
}
}
+private:
+
void SetUpMixin() {
/* For using this fixture in other tests only */
if (mCameraID != -1) {