diff options
author | Nícolas F. R. A. Prado <nfraprado@collabora.com> | 2025-04-28 11:02:38 +0200 |
---|---|---|
committer | Paul Elder <paul.elder@ideasonboard.com> | 2025-05-13 20:17:19 +0200 |
commit | f3a12332f6d987b34893b2a41294dba6db5feb39 (patch) | |
tree | 4d65e78290230f622e6ed9870e31245dcbd93922 /src/apps/lc-compliance/test_base.h | |
parent | d01342f1dc0e73c04526dfcb047d48227dde8e17 (diff) |
Different base classes can be used for different setups on tests, but
all of them will need to setup the camera for the test. To reuse that
code, move it to a separate CameraHolder class that is inherited by test
classes.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
Diffstat (limited to 'src/apps/lc-compliance/test_base.h')
-rw-r--r-- | src/apps/lc-compliance/test_base.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/apps/lc-compliance/test_base.h b/src/apps/lc-compliance/test_base.h new file mode 100644 index 00000000..52347749 --- /dev/null +++ b/src/apps/lc-compliance/test_base.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2021, Collabora Ltd. + * + * test_base.h - Base definitions for tests + */ + +#ifndef __LC_COMPLIANCE_TEST_BASE_H__ +#define __LC_COMPLIANCE_TEST_BASE_H__ + +#include <libcamera/libcamera.h> + +#include <gtest/gtest.h> + +class CameraHolder +{ +protected: + void acquireCamera(); + void releaseCamera(); + + std::shared_ptr<libcamera::Camera> camera_; +}; + +#endif /* __LC_COMPLIANCE_TEST_BASE_H__ */ |