test: camera: Use the CameraManager from the CameraTest base class

Make the camera manager a protected field of the CameraTest class, and
use it instead of CameraManager::instance() in the camera tests. This
prepares for the removal of CameraManager::instance().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Laurent Pinchart 2019-08-18 03:13:29 +03:00
parent fd0087b5d8
commit 5ce4bb62e7
3 changed files with 3 additions and 5 deletions

View file

@ -375,7 +375,7 @@ protected:
return TestFail; return TestFail;
} }
EventDispatcher *dispatcher = CameraManager::instance()->eventDispatcher(); EventDispatcher *dispatcher = cm_->eventDispatcher();
Timer timer; Timer timer;
timer.start(5000); timer.start(5000);

View file

@ -23,10 +23,8 @@ protected:
int init(); int init();
void cleanup(); void cleanup();
std::shared_ptr<Camera> camera_;
private:
CameraManager *cm_; CameraManager *cm_;
std::shared_ptr<Camera> camera_;
}; };
#endif /* __LIBCAMERA_CAMERA_TEST_H__ */ #endif /* __LIBCAMERA_CAMERA_TEST_H__ */

View file

@ -120,7 +120,7 @@ protected:
} }
} }
EventDispatcher *dispatcher = CameraManager::instance()->eventDispatcher(); EventDispatcher *dispatcher = cm_->eventDispatcher();
Timer timer; Timer timer;
timer.start(1000); timer.start(1000);