diff options
author | Igor Murashkin <iam@google.com> | 2012-11-06 17:02:54 -0800 |
---|---|---|
committer | Igor Murashkin <iam@google.com> | 2012-11-27 11:38:06 -0800 |
commit | eab33fc589a8e1ca04f5703b5f1ace69f8ff9aea (patch) | |
tree | aa511cddad9a1643fec806ed54e198923b4fcc65 /tests/camera2/CameraMetadataTests.cpp | |
parent | 192e51c92a34645b5e6e864d9ba65b245bd37c2b (diff) | |
download | hardware_libhardware-eab33fc589a8e1ca04f5703b5f1ace69f8ff9aea.zip hardware_libhardware-eab33fc589a8e1ca04f5703b5f1ace69f8ff9aea.tar.gz hardware_libhardware-eab33fc589a8e1ca04f5703b5f1ace69f8ff9aea.tar.bz2 |
Camera2: Tests -- Fork each test before executing it
Use CAMERA2_TEST_FORKING_DISABLED=1 environment variable to override this
behavior (e.g. when wanting to attach gdb to the test app).
Change-Id: Ib639885bdb827fc2415c878cbcb1b2d84dff687b
Diffstat (limited to 'tests/camera2/CameraMetadataTests.cpp')
-rw-r--r-- | tests/camera2/CameraMetadataTests.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/tests/camera2/CameraMetadataTests.cpp b/tests/camera2/CameraMetadataTests.cpp index 739eba6..18710bc 100644 --- a/tests/camera2/CameraMetadataTests.cpp +++ b/tests/camera2/CameraMetadataTests.cpp @@ -32,7 +32,9 @@ #include <gui/SurfaceTextureClient.h> #include <string> + #include "CameraStreamFixture.h" +#include "TestExtensions.h" namespace android { namespace camera2 { @@ -45,16 +47,18 @@ static CameraStreamParams METADATA_STREAM_PARAMETERS = { /*mHeapCount*/ 2 }; -class DISABLED_CameraMetadataTest +class CameraMetadataTest : public ::testing::Test, public CameraStreamFixture { public: - DISABLED_CameraMetadataTest() + CameraMetadataTest() : CameraStreamFixture(METADATA_STREAM_PARAMETERS) { + TEST_EXTENSION_FORKING_CONSTRUCTOR; } - ~DISABLED_CameraMetadataTest() { + ~CameraMetadataTest() { + TEST_EXTENSION_FORKING_DESTRUCTOR; } int GetTypeFromTag(uint32_t tag) const { @@ -67,22 +71,13 @@ public: return entry.type; } - static void SetUpTestCase() { - } - - static void TearDownTestCase() - { - } - protected: }; -TEST_F(DISABLED_CameraMetadataTest, types) { +TEST_F(CameraMetadataTest, types) { - if (HasFatalFailure()) { - return; - } + TEST_EXTENSION_FORKING_INIT; //FIXME: set this up in an external file of some sort (xml?) { |